コード例 #1
0
 public void setGame(THHGame game, THHPlayer player)
 {
     InitReplaceDialog.hide();
     TurnTipImage.hide();
     SelfHandList.clearItems();
     SelfFieldList.clearItems();
     EnemyFieldList.clearItems();
     EnemyHandList.clearItems();
     AttackArrowImage.hide();
     Fatigue.hide();
 }
コード例 #2
0
ファイル: Table.cs プロジェクト: minsuika/TouhouHeartstone
        public void setGame(THHGame game, THHPlayer player)
        {
            InitReplaceDialog.hide();
            TurnTipImage.hide();
            SelfHandList.clearItems();
            SelfFieldList.clearItems();
            EnemyFieldList.clearItems();
            EnemyHandList.clearItems();
            AttackArrowImage.hide();
            Fatigue.hide();
            _animationQueue.Clear();

            if (game != null)
            {
                game.triggers.onEventBefore -= onEventBefore;
                game.triggers.onEventAfter  -= onEventAfter;
            }
            this.game = game;
            if (game != null)
            {
                game.triggers.onEventBefore += onEventBefore;
                game.triggers.onEventAfter  += onEventAfter;
            }
            if (player != null)
            {
                SelfSkill.asButton.onClick.RemoveAllListeners();
                TurnEndButton.onClick.RemoveAllListeners();
            }
            this.player = player;
            if (player != null)
            {
                SelfSkill.asButton.onClick.AddListener(() =>
                {
                    if (selectableTargets != null)
                    {
                        return;
                    }
                    player.cmdUse(game, SelfSkill.card, 0);
                });
                TurnEndButton.onClick.AddListener(() =>
                {
                    player.cmdTurnEnd(game);

                    //SelfHandList.stopPlacing(true);
                    resetUse(true, true);
                    selectableTargets = null;
                });
            }
        }