public void setAnimation(ANIMATOR animator) { if(animator.Equals(ANIMATOR.HIT)) { this.animation.SetTrigger("Hit"); } }
private void setLocomotionValue() { ANIMATOR.SetFloat("horizontal", mInputHorizontal); ANIMATOR.SetFloat("vertical", mInputVertical); ANIMATOR.SetFloat("forwardX", transform.forward.x); ANIMATOR.SetFloat("forwardZ", transform.forward.z); ANIMATOR.SetFloat("directionX", mDirection.x); ANIMATOR.SetFloat("directionZ", mDirection.z); }
void ChangeAnimation() { if (ANIMATOR == null) { Debug.LogError(SelfObject.name + " 에게 Animator가 없습니다."); return; } ANIMATOR.SetInteger("State", (int)CurrentAIState); }
void ChangeAnimation() { if (ANIMATOR == null) { Debug.LogError(gameObject.name + " 에게 Animator가 없습니다."); return; } //은기 에니메이션 상태 확인 로그 추가 //Debug.Log("현재 애니메이션 상태는"+CurrentState + " 입니다."); ANIMATOR.SetInteger("State", (int)CurrentState); // Debug.Log(CurrentState); }
private void handleState() { //LOGGER.logTag("y", skeleton.transform.position.y.ToString()); AnimatorStateInfo info = ANIMATOR.GetCurrentAnimatorStateInfo(0); mCurrentBaseState = info.fullPathHash; if (mScalableSpeed.SPEED <= 0.0f) { if (mCurrentBaseState == idleState) { mStateMachine.onIdle(); } else if (mCurrentBaseState == jumpState) { mStateMachine.onJump(); } } if (mCurrentBaseState != jumpState) { JUMP = mOnJump; } else { mOnJump = false; //float colliderHeight = mAnimator.GetFloat("ColliderHeight"); //float h = transform.position.y + colliderHeight; //LOGGER.logTag("ColliderHeight", colliderHeight); //LOGGER.logTag("x", skeleton.transform.position.x); //LOGGER.logTag("z", skeleton.transform.position.z); //LOGGER.logTag("h", h); //Vector3 center = mCharacterController.transform.localPosition; //center = new Vector3(center.x, h, center.z); // mCharacterController.transform.localPosition = center; } mStateMachine.handleUpdate(); }