Ejemplo n.º 1
0
        void CreateFactionInfo(EntityManager manager, Entity faction)
        {
            List <Entity> entitesWithOrbits  = new List <Entity>(manager.GetAllEntitiesWithDataBlob <OrbitDB>());
            List <Entity> entitiesWithOwners = new List <Entity>(manager.GetEntitiesByFaction(faction.Guid));

            FactionSystemKnowledge factionKen = new FactionSystemKnowledge();

            factionKen.OwnedEntites.AddRange(entitiesWithOwners);
        }
        void CreateFactionInfo(EntityManager manager, Entity faction)
        {
            List <Entity> entitesWithOrbits  = new List <Entity>(manager.GetAllEntitiesWithDataBlob <OrbitDB>());
            List <Entity> entitiesWithOwners = new List <Entity>(manager.GetAllEntitiesWithDataBlob <OwnedDB>());

            FactionSystemKnowledge factionKen = new FactionSystemKnowledge();

            foreach (var item in entitiesWithOwners)
            {
                if (item.GetDataBlob <OwnedDB>().OwnedByFaction == faction)
                {
                    factionKen.OwnedEntites.Add(item);
                }
            }
        }