Пример #1
0
        private IEnumerator EnterCombatRoutine()
        {
            MyMap.SetCharactersMovement(false);

            MyFader.SetText(PlayerCharacter.name + "\n-= VS =-\n" + GetNextCharacter().name);
            OnEnterCombat.Invoke(); // play music
            MyFader.ReverseFade();
            yield return(new WaitForSeconds(1f));

            // Turn off all characters
            // turn off cavearea
            if (CaveLevel)
            {
                CaveLevel.SetActive(false);
            }

            // turn on combat area
            gameObject.SetActive(true);
            // reposition things!
            for (int i = 0; i < Spawners.Count; i++)
            {
                Spawners[i].Teleport(CombatCharacters[i]);
            }

            yield return(new WaitForSeconds(0.1f));

            MyFader.Fade();
            yield return(new WaitForSeconds(1f));

            SetButtonsInteractable(true);
            AttackingCharacterLabel.text = PlayerCharacter.name;

            EnterCombatRountine = null;
        }