diff --git a/Assets/Scenes/Menu.unity b/Assets/Scenes/Menu.unity index 87f4fda..4a2ea0e 100644 --- a/Assets/Scenes/Menu.unity +++ b/Assets/Scenes/Menu.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1038fb68833982c70b24082562986c08a39197013ce5bbe2c29550bf0281886 -size 690177 +oid sha256:e953dd16e66a23ccfcc30fc71a73076ba9df11c6e28950e9dc9319c444d9c069 +size 698736 diff --git a/Assets/spin.cs b/Assets/spin.cs index 6c7d538..e693501 100644 --- a/Assets/spin.cs +++ b/Assets/spin.cs @@ -5,9 +5,28 @@ using UnityEngine; public class spin : MonoBehaviour { public float turnFactor = 1f; + public Transform m_camera; + public float ZoomAmount = 10; private void Update() { transform.rotation = Quaternion.Euler(0f, Time.time * turnFactor, 0f); } + + public void Zoom() + { + m_camera.transform.position += m_camera.forward * ZoomAmount; + } + + public void UnZoom() + { + m_camera.transform.position -= m_camera.forward * ZoomAmount; + } + + + + + + + } diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 4ee6d14..dc952a1 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9d68927e33f4f3e699f69b00ad4478aedfa5df56941988fb3504599b27f4e46 -size 257 +oid sha256:0b8fc8984e2a1c56a682179b0eb8f67f6f7337333c09f7d96b00440788f4697c +size 269