public void ConnectGame(GameServer game) { gameServer = game; if (Type == Kind.BOT) { Notifer.Subscribe(AI, BOT_FREQ); } }
public GameServer(Player player1, Player player2) { Players = new Player[] { player1, player2 }; Size = new Point(0, 0); IsEnabled = true; SetMap1(); Players[0].ConnectGame(this); Players[1].ConnectGame(this); Notifer.Subscribe(CleanMap, GAME_CLEAN_TIME); }
public override void Attack(Cell target) { if (target.Owner == Owner) { return; } Target = target; if (!IsEnabled) { Notifer.Subscribe(TargetHandler, UNIT_FREQ); } }
public Tower(Item.Kind kind, Point location, Player player) : base(kind, location, player) { HP = TOWER_HP; BaseDamage = TOWER_DAMAGE; Notifer.Subscribe(TargetHandler, TOWER_FREQ); }
public Miner(Item.Kind kind, Point location, Player player) : base(kind, location, player) { Notifer.Subscribe(OnTimerTick, TIMER_TICK); HP = MINER_HP; }
public Producer(Item.Kind kind, Point location, Player player) : base(kind, location, player) { Notifer.Subscribe(OnTimerTick, TIMER_TICK); HP = PRODUCER_HP; UnitProgress = 0; }