public override void attack(int x, int y) { int damage = this.getWeapon().getDamage(); int range = this.getWeapon().getRange(); AttackSubject.getInstance().Attack(damage, x, y, range); }
public override void attack(int x = 0, int y = 0) { x = Player.getInstance().getLocationX(); y = Player.getInstance().getLocationY(); int damage = this.getWeapon().getDamage(); int range = this.getWeapon().getRange(); AttackSubject.getInstance().Attack(damage, x, y, range); }
private Player() { AttackSubject.getInstance().register(this); this.setWeapon(new MotarGun()); this.setEngine(new LightEngine()); }
public EnemyShip() { AttackSubject.getInstance().register(this); MoveSubject.getInstance().register(this); }