private IEnumerator __RandomizeTrigger() { while (true) { if (_useFNA && _fna != null) { _fna.SetTrigger(_triggerTest); if (DoubleParams) { _fna.SetTrigger(_triggerTest2); } } else if (_networkAnimator != null) { _networkAnimator.SetTrigger(_triggerTest); if (DoubleParams) { _networkAnimator.SetTrigger(_triggerTest2); } } yield return(new WaitForSeconds(ReturnWaitRange())); } }
/// <summary> /// Jumps. /// </summary> private void Jump() { if (!_jump) { return; } _jump = false; string jumpString = "Jump"; _animator.SetTrigger(jumpString); if (_flexNetworkAnimator != null) { _flexNetworkAnimator.SetTrigger(Animator.StringToHash(jumpString)); } }
private void Update() { if (base.hasAuthority) { //Move. float horizontal = Input.GetAxis("Horizontal"); float moveRate = 1f; transform.position += new Vector3(horizontal, 0f, 0f) * moveRate * Time.deltaTime; //Animator. _animator.SetFloat("Horizontal", horizontal); if (Input.GetKeyDown(KeyCode.Space)) { _fna.SetTrigger("Jump"); } } }
private void CmdJump() { _fna.SetTrigger("Jump"); }