Example #1
0
        IEnumerator SkillState()
        {
            if (inSkill)
            {
                yield break;
            }
            Log.AI("LastMsgIs: " + lastMsg.type);
            if (lastMsg == null || lastMsg.cmd == null)
            {
                yield break;
            }
            var sp  = lastMsg.cmd.targetPos;
            var dir = lastMsg.cmd.dir;

            inSkill = true;
            var st = new TankShoot();

            st.skillPos    = sp;
            st.skillDir    = dir;
            st.IsStatic    = lastMsg.cmd.staticShoot;
            st.skillAction = lastMsg.cmd.skillAction;
            aiCharacter.AddTempState(st);
            yield return(GetAttr().StartCoroutine(st.RunLogic()));

            inSkill = false;
        }
Example #2
0
        IEnumerator SkillState()
        {
            if (inSkill)
            {
                yield break;
            }
            inSkill = true;
            var st = new TankShoot();

            aiCharacter.AddTempState(st);
            yield return(GetAttr().StartCoroutine(st.RunLogic()));

            inSkill = false;
        }