Пример #1
0
 public virtual void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback)
 {
     Card checkedCard = player.Game.GameTable.CheckDeck();
     bool result = checkCallback(checkedCard);
     Game.Session.EventManager.OnPlayerCheckedDeck(player, checkedCard, causedBy, result);
     resultCallback(causedBy, result);
 }
Пример #2
0
 public LuckyDukeResponseHandler(LuckyDuke parent, Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback)
     : base(RequestType.LuckyDuke, parent.Player)
 {
     this.parent = parent;
     this.causedBy = causedBy;
     this.checkCallback = checkCallback;
     this.resultCallback = resultCallback;
 }
Пример #3
0
 public void AddHandler(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback)
 {
     AddHandler(new LuckyDukeResponseHandler(parent, causedBy, checkCallback, resultCallback));
 }
Пример #4
0
 public override void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback)
 {
     queue.AddHandler(causedBy, checkCallback, resultCallback);
     if(!queue.Active)
         Game.GameCycle.PushTempHandler(queue);
 }
Пример #5
0
 public void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback)
 {
     character.CheckDeck(causedBy, checkCallback, resultCallback);
 }
Пример #6
0
 public override void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback)
 {
     if(characters.Count == 0)
         base.CheckDeck(causedBy, checkCallback, resultCallback);
     else if(characters.Count == 1)
         characters.First().CheckDeck(causedBy, checkCallback, resultCallback);
     else
         Game.GameCycle.PushTempHandler(new ChooseCharacterResponseHandler(this, RequestType.ChooseCharacterForCheckDeck, c =>
         {
             if(c != null)
                 c.CheckDeck(causedBy, checkCallback, resultCallback);
             else
                 base.CheckDeck(causedBy, checkCallback, resultCallback);
         }));
 }