/// <summary> /// Start to initialize all monsters, characters, and combat queue before beginning combat /// </summary> public IEnumerator InitializeCombat(string[] monsterNames) { actionsPanel.cm = this; actionsPanel.Init(isFleePossible); foreach (string monsterName in monsterNames) { yield return(StartCoroutine(AddMonster(monsterName))); } ArrangeMonsters(); partyMembers = PartyManager.instance.GetPartyMembers(ref countID); foreach (Monster m in monsters) { cq.AddCharacter(m); } foreach (PartyMember pm in partyMembers) { cq.AddCharacter(pm); } cq.FinalizeQueue(); yield return(new WaitForSeconds(2)); // wait 2 seconds to play monster intro for now eventDescription.ClearText(); StartCombat(); }
// ----------------------------------------------------------------- void Start() { catActionsTable = new CatActionsTable(); currentMood = CatMood.GOOD; actionPanel.Init(this); infoPanel.SetMood(currentMood); }
/// <summary> /// Displays the current event to the player /// </summary> public void DisplayEvent() { Debug.Log(eventBackground); Debug.Log(currentEvent); eventBackground.sprite = GetBGSprite(currentEvent.bgPackName); if (currentEvent.promptKey == "combat_event") { eventDescription.SetText(currentSubArea.GetCombatPrompt()); GetCombatEvent(); } else { if (currentEvent.promptKey == "nothing_event") { eventDescription.SetText(currentSubArea.GetNothingPrompt()); } else { eventDescription.SetText(currentEvent.promptKey); } if (currentEvent.spriteNum > 0) { ShowEventDisplays(); } else { HideEventDisplays(); } statusPanel.DisplayPartyMember(PartyManager.instance.GetPartyMembers()[0]); actionsPanel.Init(currentEvent.isLeavePossible); actionsPanel.SetInteractionActions(currentEvent.interactions); actionsPanel.SetHorizontalNavigation(partyPanel); } }