public void shoot(StandardEntities entity) { Entity ent = world.EntityManager.createEntity(entity); ent.setLocation(this.Location); if (ent is MoveableEntity) { ((MoveableEntity)ent).setVelocity(lastMoveDirection == MoveDirection.LEFT ? -15f + xvel : 15f + xvel, 0); //-1.5f + yvel); } }
public T createEntity <T>(StandardEntities entity) where T : Entity { return((T)createEntity((int)entity)); }
public Entity createEntity(StandardEntities entity) { return(createEntity((int)entity)); }