예제 #1
0
    public override void UpdateAction()
    {
        base.UpdateAction();

        if (EntityUtil.StateActionMacro(Owner))
        {
            return;
        }

        if (PlayerUtil.GetAttackInput())
        {
            Owner.CurrentAction = PlayerAttackAction.GetInstance();
            return;
        }

        Vector3 velocity = PlayerUtil.GetVelocityInput();

        if (velocity.magnitude < 0.1f)
        {
            Owner.CurrentAction = PlayerIdleAction.GetInstance();
            return;
        }

        Owner.transform.rotation = Quaternion.LookRotation(velocity, Vector3.up);
        Owner.NavAgent.Move(velocity * Owner.Status.CurrentSpeed * Time.deltaTime);

        AnimUtil.RotationAnim(Owner, "run");
    }
예제 #2
0
    public override void UpdateAction()
    {
        base.UpdateAction();
        PlayerUtil.CardInterfaceLogicMacro();


        if (EntityUtil.HitDeadLogicMacro(Owner, "PlayerHitAction", "PlayerDeadAction"))
        {
            return;
        }

        if (PlayerUtil.GetAttackInput())
        {
            Owner.CurrentAction = PlayerAttackAction.GetInstance();
            return;
        }

        Vector3 velocity = PlayerUtil.GetVelocityInput();

        if (velocity.magnitude < 0.1f)
        {
            Owner.CurrentAction = PlayerIdleAction.GetInstance();
            return;
        }

        Owner.transform.rotation = Quaternion.LookRotation(velocity, Vector3.up);
        Owner.NavAgent.Move(velocity * 1.1f * Time.deltaTime);

        AnimUtil.RotationAnim(Owner, "run");
    }
예제 #3
0
    public override void UpdateAction()
    {
        base.UpdateAction();

        if (EntityUtil.StateActionMacro(Owner))
        {
            return;
        }

        if (PlayerUtil.GetAttackInput())
        {
            Owner.CurrentAction = PlayerAttackAction.GetInstance();
            return;
        }

        Vector3 velocity = PlayerUtil.GetVelocityInput();

        if (velocity.magnitude > 0.1f)
        {
            Owner.CurrentAction = PlayerMoveAction.GetInstance();
            return;
        }
    }
예제 #4
0
    public override void UpdateAction()
    {
        base.UpdateAction();
        PlayerUtil.CardInterfaceLogicMacro();

        if (EntityUtil.HitDeadLogicMacro(Owner, "PlayerHitAction", "PlayerDeadAction"))
        {
            return;
        }

        if (PlayerUtil.GetAttackInput())
        {
            Owner.CurrentAction = PlayerAttackAction.GetInstance();
            return;
        }

        Vector3 velocity = PlayerUtil.GetVelocityInput();

        if (velocity.magnitude > 0.1f)
        {
            Owner.CurrentAction = PlayerMoveAction.GetInstance();
            return;
        }
    }