public Bullet(GameInstance game, math.Position position, Entity source, math.Direction direction) : base(game, position) { this.owner = source; this.glyph = 'O'; this.direction = direction; if (!source.game.IsClear(source.pos.offset(direction))) { this.Remove(); } }
public void Shoot(math.Direction direction) { Bullet bullet = new Bullet(this.game, this.pos, this, direction); this.game.Spawn(bullet); }