Пример #1
0
 public void Initialize()
 {
     AttackEvent.Subscribe(this, 0, Attack);
     DamageEvent.Subscribe(this, 0, Damage);
     DeathEvent.Subscribe(this, 0, Death);
     PlayEvent.Subscribe(this, 0, Play);
     TurnEvent.Subscribe(this, 0, NewTurn);
 }
Пример #2
0
        public virtual Card Instantiate()
        {
            var card = new Card(name, description, MANA, ATTACK, HEALTH);

            AttackEvent.Subscribe(card, 0, Attack);
            DamageEvent.Subscribe(card, 0, Damage);
            DeathEvent.Subscribe(card, 0, Death);
            PlayEvent.Subscribe(card, 0, Play);
            TurnEvent.Subscribe(card, 0, NewTurn);
            return(card);
        }
Пример #3
0
 public Game(int startingPlayer, params Player[] players)
 {
     TurnEvent.Subscribe(this, 0, NextTurn);
     this.players = players;
     turn         = Convert.ToInt32(startingPlayer == 0);
     foreach (var player in players)
     {
         player.ExecuteDraw(3);
     }
     ExecuteNextTurn();
 }