Пример #1
0
        public override void begin(KGCharacterController cc)
        {
            KGEnemyController ec = (KGEnemyController)cc;

            ec.m_SkeletonAnim.loop          = true;
            ec.m_SkeletonAnim.AnimationName = "idle";
        }
Пример #2
0
        public override void execute(KGCharacterController cc)
        {
            KGEnemyController ec = (KGEnemyController)cc;

            if (cc.hitAttacks.Count != 0)
            {
                ec.hitAttackHandle();
            }
            else
            {
                if (ec.m_SkeletonAnim.state.GetCurrent(0).time >= ec.m_SkeletonAnim.state.GetCurrent(0).endTime)
                {
                    ec.m_Character.curState = ec.g_behavior;
                    ec.g_behavior.begin(cc);
                }
            }
        }