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)); } }
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)); } }
private void OnRotation(RotationOffset fromCurrent) { playerSprites.ChangePlayerDirection(fromCurrent); }