Exemplo n.º 1
0
        // 다음에 적이 사용할 스킬
        private Skill NextEnemySkill()
        {
            int enemySkillLength = _enemyPokemon.Info._skills.Length;

            Skill enemySkill = _enemyPokemon.UseSkill(Random.Range(0, enemySkillLength));

            if (enemySkill._currentCount <= 0)
            {
                enemySkill = PokemonManager.DefaultSkill();
            }

            enemySkill._currentCount--;

            return(enemySkill);
        }
Exemplo n.º 2
0
        public void UseSkill(int indexOfSkill)
        {
            _state = BattleState.Act;

            Skill playerSkill = _myPokemon?.UseSkill(indexOfSkill);

            if (playerSkill._currentCount <= 0)
            {
                playerSkill = PokemonManager.DefaultSkill();
            }

            playerSkill._currentCount--;
            _uiManager._mainUI.UpdateMainUI(PokemonBattleMainUI.UIState.Battle);
            _uiManager._bottomUI.UpdateDialog();

            StartCoroutine(ActPhase(playerSkill._battleEvent, NextEnemySkill()._battleEvent));
        }