Commit further WIP refactor

more-targets
Daniel Lovell 2024-09-23 12:28:45 -07:00
parent 16f663ec78
commit 3b64fc9f2b
1 changed files with 6 additions and 43 deletions

View File

@ -155,7 +155,7 @@ public class InputManager : MonoBehaviour
autoRotate = !autoRotate; autoRotate = !autoRotate;
if (autoRotate) if (autoRotate)
{ {
autoplayRoutine = StartCoroutine(AutoPlayRoutine()); autoplayRoutine = StartCoroutine(AutoPlayRoutine());
} }
else else
{ {
@ -166,66 +166,29 @@ public class InputManager : MonoBehaviour
if (Input.GetKeyDown(KeyCode.Alpha1)) if (Input.GetKeyDown(KeyCode.Alpha1))
{ {
// ORIGIN // ORIGIN
transform.position = new Vector3(0, 20, -20); // Set pre-set view 1
SetCameraRotation(Quaternion.Euler(24f, -0.5f, 0));
Camera.main.fieldOfView = 45f;
ResetCameraTarget();
} }
if (Input.GetKeyDown(KeyCode.Alpha2)) if (Input.GetKeyDown(KeyCode.Alpha2))
{ {
transform.position = new Vector3(0, 30, -20); // Set pre-set view 2
SetCameraRotation(Quaternion.Euler(36.6f, -0.5f, 0));
Camera.main.fieldOfView = 60f;
ResetCameraTarget();
} }
if (Input.GetKeyDown(KeyCode.Alpha4)) if (Input.GetKeyDown(KeyCode.Alpha4))
{ {
if (Input.GetKey(KeyCode.LeftShift)) // Set pre-set view 4
{
fourPos.position = transform.position;
fourPos.rotation = transform.rotation;
}
else
{
transform.position = fourPos.position;
SetCameraRotation(fourPos.rotation);
ResetCameraTarget();
}
} }
if (Input.GetKeyDown(KeyCode.Alpha5)) if (Input.GetKeyDown(KeyCode.Alpha5))
{ {
if (Input.GetKey(KeyCode.LeftShift)) // Set pre-set view 5
{
fivePos.position = transform.position;
fivePos.rotation = transform.rotation;
}
else
{
transform.position = fivePos.position;
SetCameraRotation(fivePos.rotation);
ResetCameraTarget();
}
} }
if (Input.GetKeyDown(KeyCode.Alpha6)) if (Input.GetKeyDown(KeyCode.Alpha6))
{ {
if (Input.GetKey(KeyCode.LeftShift)) // Set pre-set view 6
{
sixPos.position = transform.position;
sixPos.rotation = transform.rotation;
}
else
{
transform.position = sixPos.position;
SetCameraRotation(sixPos.rotation);
ResetCameraTarget();
}
} }