Merge pull request #34 from menduz/master

Normalize names for iterators across views
master
prime31 1 year ago committed by GitHub
commit 0c73e99107

@ -6,11 +6,13 @@ pub const ComponentStorage = @import("ecs/component_storage.zig").ComponentStora
pub const Entity = @import("ecs/registry.zig").Entity;
pub const Registry = @import("ecs/registry.zig").Registry;
pub const EntityHandles = @import("ecs/registry.zig").EntityHandles;
pub const BasicView = @import("ecs/views.zig").BasicView;
pub const BasicMultiView = @import("ecs/views.zig").BasicMultiView;
pub const BasicGroup = @import("ecs/groups.zig").BasicGroup;
pub const OwningGroup = @import("ecs/groups.zig").OwningGroup;
pub const SparseSet = @import("ecs/sparse_set.zig").SparseSet;
pub const utils = @import("ecs/utils.zig");
// signals
pub const Signal = @import("signals/signal.zig").Signal;

@ -14,7 +14,7 @@ const root = @import("root");
pub const entity_traits = if (@hasDecl(root, "EntityTraits")) root.EntityTraits.init() else @import("entity.zig").EntityTraits.init();
// setup the Handles type based on the type set in EntityTraits
const EntityHandles = Handles(entity_traits.entity_type, entity_traits.index_type, entity_traits.version_type);
pub const EntityHandles = Handles(entity_traits.entity_type, entity_traits.index_type, entity_traits.version_type);
pub const Entity = entity_traits.entity_type;
const BasicView = @import("views.zig").BasicView;

@ -142,7 +142,7 @@ pub fn MultiView(comptime n_includes: usize, comptime n_excludes: usize) type {
utils.sortSub(usize, u32, sub_items[0..], self.type_ids[0..], asc_usize.sort);
}
pub fn iterator(self: *Self) Iterator {
pub fn entityIterator(self: *Self) Iterator {
self.sort();
return Iterator.init(self);
}

Loading…
Cancel
Save