示例#1
0
    private void CheckTurnBattle()
    {
        if (m_playerDinosaur.currentHP <= 0)
        {
            m_playerDinosaur.SetDisableDinosaurAnimation();
            m_playerDinosaur = m_playerDeck.GetNextDinosaur();
            playerDinoHPGauge.InitializeHPGauge();

            if (m_playerDinosaur != null)
            {
                m_playerDinosaur.SetDinosaurAnimation();
                SetPlayerDinofield();
            }
        }

        if (m_enemyDinosaur.currentHP <= 0)
        {
            m_enemyDinosaur.SetDisableDinosaurAnimation();
            m_enemyDinosaur = m_enemyDeck.GetNextDinosaur();
            enemyDinoHPGauge.InitializeHPGauge();

            if (m_enemyDinosaur != null)
            {
                m_enemyDinosaur.SetDinosaurAnimation();
                SetEnemyDinofield();
            }
        }

        //승리
        if (m_playerDinosaur != null && m_enemyDinosaur == null)
        {
            battleResultPanel.SetWinResultText();
            return;
        }
        //패배
        else if (m_enemyDinosaur != null && m_playerDinosaur == null)
        {
            battleResultPanel.SetLoseResultText();
            return;
        }
        //무승부
        else if (m_playerDinosaur == null && m_enemyDinosaur == null)
        {
            battleResultPanel.SetDrawResultText();
            return;
        }

        //
        m_playerDinosaur.InitializeStatus();
        m_enemyDinosaur.InitializeStatus();
        StartTurn();
    }