override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        nangkuriBase = animator.GetComponent <Base_Nangkuri>();
        rBody        = animator.GetComponent <Rigidbody2D>();

        if (Random.Range(0, 1) == 0)
        {
            nangkuriBase.SwitchDirection();
        }
    }
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     nangkuriBase = animator.GetComponent <Base_Nangkuri>();
     animator.GetComponent <Rigidbody2D>().velocity = new Vector2(0.0f, animator.GetComponent <Rigidbody2D>().velocity.y);
 }
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        nangkuriBase = animator.GetComponent <Base_Nangkuri>();

        nangkuriBase.PlayerHurt.enabled = false;
    }
示例#4
0
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     nangkuriBase = animator.GetComponent <Base_Nangkuri>();
     rBody        = animator.GetComponent <Rigidbody2D>();
 }