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; }
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { nangkuriBase = animator.GetComponent <Base_Nangkuri>(); rBody = animator.GetComponent <Rigidbody2D>(); }