public void StopMove() { _force_move = false; _forward = Vector3.zero; XAnimComponent anim = GetComponent <XAnimComponent>(); if (anim != null) { anim.SetTrigger(AnimTriger.ToMove, false); anim.SetTrigger(AnimTriger.ToStand); _state = XStateDefine.XState_Idle; } }
public void MoveForward(Vector3 forward) { _forward = forward; _force_move = true; XAnimComponent anim = GetComponent <XAnimComponent>(); if (anim != null) { anim.SetTrigger(AnimTriger.ToMove); _state = XStateDefine.XState_Move; } }
private void LateUpdate() { if (_attribute != null) { _attribute.UpdateRotation(); } if (!string.IsNullOrEmpty(trigger) && _anim != null && !_anim.Ator.IsInTransition(0)) { if (trigger != AnimTriger.ToStand && trigger != AnimTriger.ToMove && trigger != AnimTriger.EndSkill) { Execute(); } _anim.SetTrigger(trigger); trigger = null; } }