コード例 #1
0
 public virtual void RemovedFrom(DeckLocation location, Player player)
 {
     if (_TokenEventHandler != null)
     {
         player.TokenActedOn -= _TokenEventHandler;
     }
     _TokenEventHandler = null;
 }
コード例 #2
0
 public virtual void AddedTo(DeckLocation location, Player player)
 {
     if (location == DeckLocation.Hand)
     {
         if (player._Game.Table.Supplies.ContainsKey(this))
         {
             if (player._Game.Table.Supplies[this].Tokens.Any(token => token.ActDefined))
             {
                 _TokenEventHandler   = new Token.TokenActionEventHandler(token_TokenAction);
                 player.TokenActedOn += _TokenEventHandler;
             }
         }
     }
 }