IEnumerator PlayIntro() { isIntroStarted = true; yield return(cc.StartCoroutine(cc.PlayIntro())); gamephase = 2; isIntroStarted = false; }
/* OVERRIDES */ private void Awake() { State = BattleState.INIT; // DEBUG - Set encounter data from inside scene if (Application.isEditor) { if (!EncounterDataStaticContainer.IsDataSet()) { Debug.Log("Setting dummy data from inside BattleController - did you mean to do this?"); EncounterDataStaticContainer.SetData(new EncounterData(debugHeroNames, debugEnemyNames)); } } // Grab the encounter data (hopefully it was set before loading this scene) InitEncounterData(); // Deserialize Hero/Enemy data and initialise objects SetupCombatants(); // Discern the turn order InitialiseTurnOrder(); // Start the animation coroutine handler StartCoroutine(AnimCoroutineManager()); // If we're going to have to wait on the player, raise our flag if (CurrCombatant.Allegiance == Allegiance.PLAYER) { WaitingOnPlayerTurn = true; State = BattleState.PLAYERCHOICE; } else { WaitingOnPlayerTurn = false; State = BattleState.ENEMYCHOICE; } ResolvedAurasThisTurn = false; // Start the camera animation if (!skipIntro) { UIEnabled = false; cameraController.PlayIntro(); } else { UIEnabled = true; } }