Esempio n. 1
0
 public void ConnectGame(GameServer game)
 {
     gameServer = game;
     if (Type == Kind.BOT)
     {
         Notifer.Subscribe(AI, BOT_FREQ);
     }
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public override void Attack(Cell target)
 {
     if (target.Owner == Owner)
     {
         return;
     }
     Target = target;
     if (!IsEnabled)
     {
         Notifer.Subscribe(TargetHandler, UNIT_FREQ);
     }
 }
Esempio n. 4
0
 public Tower(Item.Kind kind, Point location, Player player) : base(kind, location, player)
 {
     HP         = TOWER_HP;
     BaseDamage = TOWER_DAMAGE;
     Notifer.Subscribe(TargetHandler, TOWER_FREQ);
 }
Esempio n. 5
0
 public Miner(Item.Kind kind, Point location, Player player) : base(kind, location, player)
 {
     Notifer.Subscribe(OnTimerTick, TIMER_TICK);
     HP = MINER_HP;
 }
Esempio n. 6
0
 public Producer(Item.Kind kind, Point location, Player player) : base(kind, location, player)
 {
     Notifer.Subscribe(OnTimerTick, TIMER_TICK);
     HP           = PRODUCER_HP;
     UnitProgress = 0;
 }