public void PlayActionAgain(HotGirlEvent aCardWasPlayed) { ActionCardPlayed actionCardEvent = (ActionCardPlayed)aCardWasPlayed; Services.eventManager.Unregister <ActionCardPlayed>(PlayActionAgain); Services.encounter.Play(actionCardEvent.cardPlayed); }
//The Effect registers this method for the ActionCardPlayed event public void PlayActionAgain(HotGirlEvent aCardWasPlayed) { ActionCardPlayed actionCardEvent = (ActionCardPlayed)aCardWasPlayed; Services.eventManager.Unregister <ActionCardPlayed>(PlayActionAgain); //Unregisters this method Services.encounter.Play(actionCardEvent.cardPlayed); //Plays the card a second time }
private void CheckWhatCardWasPlayed(HotGirlEvent hotGirlEvent) { ActionCardPlayed action = (ActionCardPlayed)hotGirlEvent; if (action.cardPlayed.displayedInfo.type == Card.Vibes.Hype) { hypeCardsPlayed.Add(action.cardPlayed); } }
public void CheckWhatCardWasPlayed(HotGirlEvent hotGirlEvent) { ActionCardPlayed actionTaken = (ActionCardPlayed)hotGirlEvent; if (actionTaken.cardPlayed.GetType() == typeof(Dance)) { danceCardsPlayed++; } }
public void Play(Card cardToPlay) { var newEvent = new ActionCardPlayed(cardToPlay); Services.eventManager.Fire((HotGirlEvent)newEvent); cardToPlay.Effect(); //Tells event manager that a card was played }