public Entity ConstructEntity()
        {
            var entity = ENTITIES.Construct(Type);

            entity.Load(this);

            return(entity);
        }
Example #2
0
 public Entity(ENTITIES type, PointF location, int spriteID, bool solid = false, Byte height = 50, Byte drawOrder = 8, float boundingBox = 1.0f)
 {
     this.type = type;
     this.location = location;
     this.height = height;
     this.drawOrder = drawOrder;
     this.boundingBox = boundingBox;
     this.spriteID = spriteID;
     this.solid = solid;
     this.ID = entityID++;
 }
Example #3
0
 /// <summary>
 /// Gets all entities by given ENTITIES type
 /// </summary>
 /// <param name="type"></param>
 /// <returns>All entities with given type</returns>
 public List<Entity> getEntitiesByType(ENTITIES type)
 {
     List<Entity> returnEntities = new List<Entity> ();
     foreach (Entity e in objects) {
         if (e.getType () == type)
             returnEntities.Add(e);
     }
     return returnEntities;
 }