Exemplo n.º 1
0
    void RoundBegin()
    {
        Debug.Log("轮到" + roundTurn.ToString() + "的回合");

        switch (roundTurn)
        {
        case RoundTurn.PlayerRound:

            player.CardManager.ExpenseReset();
            StartCoroutine(PlayerDrawCard(3));
            //player.GetCardsFromLibrary(3);

            break;

        case RoundTurn.EnemyRound:

            enemy.CardManager.ExpenseReset();

            enemy.GetCardsFromLibrary(3);

            break;
        }

        ChangeRoundStatus(RoundStatus.Rounding);
    }
Exemplo n.º 2
0
    void Update()
    {
        InputControl();
        switch (battleStatus)
        {
        case BattleStatus.BattleBegin:
            battleStatus = BattleStatus.BattleBegin;

            player.CardManager.ExpenseReset();
            player.CardManager.SelectCard();
            player.GetCardsFromLibrary(6);

            enemy.GetCardsFromLibrary(6);

            roundStatus  = RoundStatus.RoundBegin;
            roundTurn    = RoundTurn.PlayerRound;
            battleStatus = BattleStatus.Batttling;

            break;

        case BattleStatus.Batttling:

            battleStatus = enemy.HP <= 0 ? BattleStatus.PlayerWin : battleStatus;
            battleStatus = player.HP <= 0 ? BattleStatus.PlayerLose : battleStatus;

            switch (roundStatus)
            {
            case RoundStatus.RoundBegin:
                Debug.Log("轮到" + roundTurn.ToString() + "的回合");
                switch (roundTurn)
                {
                case RoundTurn.PlayerRound:
                    player.CardManager.ExpenseReset();
                    player.GetCardsFromLibrary(3);
                    break;

                case RoundTurn.EnemyRound:
                    enemy.CardManager.ExpenseReset();
                    enemy.GetCardsFromLibrary(3);
                    break;
                }
                roundStatus = RoundStatus.Rounding;
                break;

            case RoundStatus.Rounding:
                switch (roundTurn)
                {
                case RoundTurn.PlayerRound:
                    break;

                case RoundTurn.EnemyRound:
                    if (enemy.isRound == false)
                    {
                        StartCoroutine("EnemyPutCard");
                        enemy.isRound = true;
                    }
                    break;
                }
                break;

            case RoundStatus.RoundEnd:
                switch (roundTurn)
                {
                case RoundTurn.PlayerRound:
                    player.BuffReduce();
                    roundTurn = RoundTurn.EnemyRound;
                    break;

                case RoundTurn.EnemyRound:
                    enemy.BuffReduce();
                    roundTurn = RoundTurn.PlayerRound;
                    break;
                }
                roundStatus = RoundStatus.RoundBegin;
                break;
            }
            break;

        case BattleStatus.PlayerLose:
            GameManager.Instance.ReturnToMenu(false);
            battleStatus = BattleStatus.PlayerPause;
            break;

        case BattleStatus.PlayerWin:
            battleStatus = BattleStatus.PlayerPause;
            PlayerWin();
            break;

        case BattleStatus.PlayerPause:
        default:
            break;
        }
    }