コード例 #1
0
ファイル: EntityQuery.cs プロジェクト: guerro323/GameHost
        public EntityQuery(GameWorld gameWorld, FinalizedQuery query)
        {
            GameWorld = gameWorld;
            All       = query.All.ToArray();
            None      = query.None.ToArray();
            Or        = query.Or.ToArray();

            matchedArchetypes = new PooledList <uint>();
            archetypeIsValid  = Array.Empty <bool>();
        }
コード例 #2
0
 public static EntityEnumerator QueryEntity(this GameWorld world, FinalizedQuery finalizedQuery)
 {
     return(new EntityEnumerator {
         World = world, Inner = QueryArchetype(world, finalizedQuery)
     });
 }
コード例 #3
0
 public static ArchetypeEnumerator QueryArchetype(this GameWorld world, FinalizedQuery finalizedQuery)
 {
     return(new ArchetypeEnumerator {
         Board = world.Boards.Archetype, Archetypes = world.Boards.Archetype.Registered, finalizedQuery = finalizedQuery
     });
 }