Esempio n. 1
0
    public override void OnStateExit(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex)
    {//重置状态
        lazyInit(animator);

        roleController.ClearCurrAnimDamageGameObject();

        animator.SetBool("action1", false);

        animator.SetBool("action2", false);

        animator.SetBool("action3", false);

        animator.SetBool("action4", false);


        if (roleController.animatorParams.ContainsKey("action5"))
        {
            animator.SetBool("action5", false);
        }
        if (roleController.animatorParams.ContainsKey("action6"))
        {
            animator.SetBool("action6", false);
        }
        if (roleController.animatorParams.ContainsKey("action7"))
        {
            animator.SetBool("action7", false);
        }
        if (roleController.animatorParams.ContainsKey("action-skill"))
        {
            animator.SetBool("action-skill", false);
        }

        if (roleController.animatorParams.ContainsKey("pickup"))
        {
            animator.SetBool("pickup", false);
        }

        if (roleController.animatorParams.ContainsKey("broken"))
        {
            animator.SetBool("broken", false);
        }

        if (roleController.animatorParams.ContainsKey("renew"))
        {
            animator.SetBool("renew", false);
        }

        if (roleController.animatorParams.ContainsKey("defence_back_hurt"))
        {
            animator.SetBool("defence_back_hurt", false);
        }

        if (roleController.animatorParams.ContainsKey("climb_begin"))
        {
            animator.SetBool("climb_begin", false);
        }
        if (roleController.animatorParams.ContainsKey("climb_drop"))
        {
            animator.SetBool("climb_drop", false);
        }
        if (roleController.animatorParams.ContainsKey("start_climb_ladder"))
        {
            animator.SetBool("start_climb_ladder", false);
        }
        if (roleController.animatorParams.ContainsKey("climb_ladder_over"))
        {
            animator.SetBool("climb_ladder_over", false);
        }
        if (roleController.animatorParams.ContainsKey("action2_end"))
        {
            animator.SetBool("action2_end", false);
        }

        animator.ResetTrigger("action1_begin");
        animator.ResetTrigger("action2_begin");

        if (roleController.animatorParams.ContainsKey("action1_end"))
        {
            animator.SetBool("action1_end", false);
        }

        if (roleController.animatorParams.ContainsKey("action-skill_end"))
        {
            animator.SetBool("action-skill_end", false);
        }

        if (roleController.animatorParams.ContainsKey("action_jump"))
        {
            animator.SetInteger("action_jump", 0);
        }

        if (roleController.animatorParams.ContainsKey("action_roll"))
        {
            animator.SetInteger("action_roll", 0);
        }

        if (roleController.animatorParams.ContainsKey("hurt"))
        {
            animator.SetBool("hurt", false);
        }

        if (roleController.animatorParams.ContainsKey("action3over"))
        {
            animator.SetBool("action3over", false);
        }

        if (roleController.animatorParams.ContainsKey("time"))
        {
            animator.SetFloat("time", 0);
        }
    }