示例#1
0
    protected IEnumerator ActionProc()
    {
        for (int i = 0; i < m_Commends.Count; ++i)
        {
            string   commend = m_Commends[i];
            string[] param   = commend.Split(",".ToCharArray());
            object[] list    = new object[param.Length - 1];
            for (int j = 1; j < param.Length; ++j)
            {
                list[j - 1] = param[j].Trim();
            }

            if (m_Owner.IsDie || m_Owner.BattleTargetHero.IsDie)
            {
                continue;
            }

            yield return(m_Owner.BattleActionCommendExcution(param[0], list));
        }

        if (m_Owner.IsDie)
        {
            m_Owner.ChangeState(EHeroBattleAction.HeroAction_BattleDie);
        }
        else
        {
            m_Owner.ChangeState(EHeroBattleAction.HeroAction_Idle);
        }
    }