public IEnumerator SetupBattle() { playerHud.CloseSkill(); playerHud.CloseFight(); playerHud.OpenChoose(); totalExp = 0; currentAction = 0; currentActionBattle = 0; currentActionBattleMove = 0; currentChooseTarget = 0; currentTalkTarget = 0; currentMultiChoice = 0; dialogueIndex = 0; talkToGhost = false; dialogueBox.ActivateDialogue(); state = BattleState.Start; StartCoroutine(StartTransition()); ghostTarget = new List <BattleUnit>(); for (int i = 0; i < enemies.Length; i++) { enemies[i].GetComponent <BattleHud>().SetData(enemies[i].Ghost); enemies[i].GetComponent <BattleHud>().Alive(); if (enemies[i].Ghost.Base.getName() != "NoGhost") { ghostTarget.Add(enemies[i]); } } yield return(new WaitForSeconds(2)); yield return(dialogueBox.TypeDialogue("Arwah jahat berkumpul")); dialogueBox.CloseDialogue(); PlayerAction(); }