示例#1
0
    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;
        }
    }
示例#2
0
    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;
        }
    }
示例#3
0
    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;
        }
    }