Пример #1
0
        public Entity GetEntityWithName(NPCName name)
        {
            if (!namedEntities.ContainsKey(name.ToString()))
            {
                return(null);
            }

            return(namedEntities[name.ToString()]);
        }
Пример #2
0
 public static Entity GetEntityWithName(List <Entity> entities, NPCName name)
 {
     return(entities.Find(entity => entity.HasState <NameState>() && entity.GetState <NameState>().Name == name.ToString()));
 }