/*public static IList<IGameEntity> GetEntities(this IGameEntity entity, IGameTemplate aTemplate)
         * {
         *  return entity.GetContentsContext().GetEntities(aTemplate);
         * }*/

        public static IGameEntity GetEntity(this IGameEntity entity, long aId)
        {
            return(entity.GetContentsContext().GetEntity(aId));
        }
 public static IGameEntity GetEntity(this IGameEntity entity, string aName)
 {
     return(entity.GetContentsContext().GetEntity(aName));
 }
 public static bool RemoveEntity(this IGameEntity entity, IGameEntity aEntity)
 {
     return(entity.GetContentsContext().RemoveEntity(aEntity));
 }
 public static IList <IGameEntity> GetEntities(this IGameEntity entity)
 {
     return(entity.GetContentsContext().Entities);
 }
 public static bool Contains(this IGameEntity entity, string aName)
 {
     return(entity.GetContentsContext().Contains(aName));
 }
 public static void AddEntities(this IGameEntity entity, IEnumerable <IGameEntity> entityList)
 {
     entity.GetContentsContext().AddEntities(entityList);
 }
 public static bool Contains(this IGameEntity entity, long aId)
 {
     return(entity.GetContentsContext().Contains(aId));
 }
 public static bool Contains(this IGameEntity entity, IGameEntity aEntity)
 {
     return(entity.GetContentsContext().Contains(aEntity));
 }
        /*public static IGameEntity GetEntity(this IGameEntity entity, IGameTemplate aTemplate)
         * {
         *  return entity.Contents.GetEntity(aTemplate);
         * }*/

        public static int Count(this IGameEntity entity)
        {
            return(entity.GetContentsContext().Count);
        }
Esempio n. 10
0
 /// <summary>
 /// Attempts to locate the given name from the contents
 /// </summary>
 internal static IGameEntity FindEntity(IGameEntity entity, string name)
 {
     return(entity.GetContentsContext().GetEntity(name));
 }
Esempio n. 11
0
 /// <summary>
 /// Attempts to locate the given name from inventory
 /// </summary>
 internal static IGameEntity FindEntityInInventory(IGameEntity biote, string name)
 {
     return(biote.GetContentsContext().Entities.Select(entity => entity as Item)
            .FirstOrDefault(item => item.CompareName(name)));
 }