Пример #1
0
    public override void OnStart()
    {
        //  m_SkeletonAnimation.state.Complete += HandleComplete;
        // m_SkeletonAnimation.ClearState();
        switch (animationName)
        {
        case BDAnimation.Idle:
            m_RoleAnimation.Idle();
            break;

        case BDAnimation.Move:
            m_RoleAnimation.Move();
            break;
            // case BDAnimation.Attack:
            //     m_SkeletonAnimation.state.SetAnimation(0, m_AniName_Attack, false);
            //     break;
            // case BDAnimation.Death:

            //     // m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PostRollingAttack, false);
            //     m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PreRollingAttack, false);
            //     m_SkeletonAnimation.state.AddAnimation(0, m_AniName_RollingAttack, true, 0f);

            //     running = true;
            //     break;
        }
    }
Пример #2
0
    public virtual void Idle()
    {
        if (m_CurStatus == RoleStatus.Die)
        {
            return;
        }

        m_CurStatus = RoleStatus.Idle;

        if (m_AniMng != null)
        {
            m_AniMng.Idle();
        }
    }
Пример #3
0
    public override void OnStart()
    {
        m_SkeletonAnimation.state.Complete += HandleComplete;
        m_SkeletonAnimation.ClearState();
        switch (animationName)
        {
        case AnimationName.Idle:
            m_RoleAnimation.Idle();
            break;

        case AnimationName.Move:
            m_RoleAnimation.Move();
            break;

        case AnimationName.Attack:
            m_SkeletonAnimation.state.SetAnimation(0, m_AniName_Attack, false);
            break;

        case AnimationName.RollingAttack:

            // m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PostRollingAttack, false);
            m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PreRollingAttack, false);
            m_SkeletonAnimation.state.AddAnimation(0, m_AniName_RollingAttack, true, 0f);

            running = true;
            break;

        case AnimationName.SpinAttack:
            // m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PostSpinAttack, false);
            m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PreSpinAttack, false);
            m_SkeletonAnimation.state.AddAnimation(0, m_AniName_SpinAttack, true, 0f);

            running = true;
            break;

        case AnimationName.SpinAttackEnd:
            m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PostSpinAttack, false);

            running = true;
            break;

        case AnimationName.RollingAttackEnd:
            m_SkeletonAnimation.state.SetAnimation(0, m_AniName_PostRollingAttack, false);

            running = true;
            break;

        case AnimationName.JustRolling:
            m_SkeletonAnimation.state.SetAnimation(0, m_AniName_RollingAttack, true);

            running = false;
            break;

        case AnimationName.JustSpin:
            m_SkeletonAnimation.state.SetAnimation(0, m_AniName_SpinAttack, true);

            running = false;
            break;

        case AnimationName.Death:
            m_RoleAnimation.Die();
            break;
        }
    }