//Lets the player select an item for the party member to use public void ButtonItemOption() { if (state == BattleStateWL.PARTYONESEL) { choiceOne = ActionChoiceWL.ITEM; state = BattleStateWL.PARTYTWOSEL; dialogueText.text = partyTwoUnit.unitName + "'s Action"; ButtonAttackBack(); } else if (state == BattleStateWL.PARTYTWOSEL) { choiceTwo = ActionChoiceWL.ITEM; state = BattleStateWL.PARTYTHREESEL; dialogueText.text = partyThreeUnit.unitName + "'s Action"; ButtonAttackBack(); } else if (state == BattleStateWL.PARTYTHREESEL) { choiceThree = ActionChoiceWL.ITEM; state = BattleStateWL.PARTYFOURSEL; dialogueText.text = partyFourUnit.unitName + "'s Action"; ButtonAttackBack(); } else if (state == BattleStateWL.PARTYFOURSEL) { choiceFour = ActionChoiceWL.ITEM; Debug.Log("Party Four Option Comp"); actionPanel.SetActive(false); attackPanel.SetActive(false); dialogueText.text = " ... "; Debug.Log("Party Four Option Comp"); StartCoroutine(PlayerCombatTurn()); } }
//Fills in action for Special Button IEnumerator CorouAttackSpecial() { if (state == BattleStateWL.PARTYONESEL) { choiceOne = ActionChoiceWL.ATTACKTWO; state = BattleStateWL.PARTYTWOSEL; yield return(new WaitForSeconds(1f)); ButtonAttackBack(); dialogueText.text = partyTwoUnit.unitName + "'s Action"; Debug.Log("Party One Option Comp"); } else if (state == BattleStateWL.PARTYTWOSEL) { choiceTwo = ActionChoiceWL.ATTACKTWO; state = BattleStateWL.PARTYTHREESEL; yield return(new WaitForSeconds(1f)); ButtonAttackBack(); dialogueText.text = partyThreeUnit.unitName + "'s Action"; Debug.Log("Party Two Option Comp"); } else if (state == BattleStateWL.PARTYTHREESEL) { choiceThree = ActionChoiceWL.ATTACKTWO; state = BattleStateWL.PARTYFOURSEL; yield return(new WaitForSeconds(1f)); ButtonAttackBack(); dialogueText.text = partyFourUnit.unitName + "'s Action"; Debug.Log("Party Three Option Comp"); } else if (state == BattleStateWL.PARTYFOURSEL) { choiceFour = ActionChoiceWL.ATTACKTWO; state = BattleStateWL.ATTACKTURN; yield return(new WaitForSeconds(1f)); actionPanel.SetActive(false); attackPanel.SetActive(false); dialogueText.text = " ... "; Debug.Log("Party Four Option Comp"); StartCoroutine(PlayerCombatTurn()); } }