public virtual void RemovedFrom(DeckLocation location, Player player) { if (_TokenEventHandler != null) { player.TokenActedOn -= _TokenEventHandler; } _TokenEventHandler = null; }
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; } } } }