Ejemplo n.º 1
0
        /// <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();
        }