예제 #1
0
        private void ChangeDirection()
        {
            Vector2 dir = (Camera.main.ScreenToWorldPoint(UnityEngine.Input.mousePosition) - transform.position).normalized;

            if (!EventSystem.current.IsPointerOverGameObject() && playerMove.allowInput)
            {
                playerSprites.ChangePlayerDirection(Orientation.From(dir));
            }
        }
예제 #2
0
    private void ChangeDirection()
    {
        Vector3 playerPos;

        if (playerMove.isGhost)
        {
            playerPos = PlayerManager.PlayerScript.ghost.transform.position;
        }
        else
        {
            playerPos = transform.position;
        }

        Vector2 dir = (Camera.main.ScreenToWorldPoint(UnityEngine.Input.mousePosition) - playerPos).normalized;

        if (!EventSystem.current.IsPointerOverGameObject() && playerMove.allowInput)
        {
            playerSprites.ChangePlayerDirection(Orientation.From(dir));
        }
    }
예제 #3
0
 private void OnRotation(RotationOffset fromCurrent)
 {
     playerSprites.ChangePlayerDirection(fromCurrent);
 }