diff --git a/Assets/Scripts/Heartbeat.cs b/Assets/Scripts/Heartbeat.cs index 2190811..3cf588b 100644 --- a/Assets/Scripts/Heartbeat.cs +++ b/Assets/Scripts/Heartbeat.cs @@ -12,13 +12,11 @@ public class Heartbeat : MonoBehaviour [SerializeField, Tooltip("Time to complete one heartbeat (in seconds)")] private float m_Period = 1.5f; // Time it takes for one full heartbeat - void Start() - { + void Start(){ } // Update is called once per frame - void Update() - { + void Update(){ // Time-based heartbeat float time = Time.time / m_Period; // Normalize time based on the period float offset = Mathf.Cos(2.0f * Mathf.PI * time); // Smooth oscillation between -1 and 1 diff --git a/Assets/Scripts/Hide.cs b/Assets/Scripts/Hide.cs index a3b819f..1c76791 100644 --- a/Assets/Scripts/Hide.cs +++ b/Assets/Scripts/Hide.cs @@ -8,14 +8,12 @@ public class Hide : MonoBehaviour private Renderer m_Renderer; - void Start() - { + void Start(){ // Get the Renderer component of the object m_Renderer = GetComponent(); } - void Update() - { + void Update(){ // Toggles visibility when the key is pressed if (Input.GetKeyDown(m_HideKey)) { diff --git a/Assets/Scripts/Oscillator.cs b/Assets/Scripts/Oscillator.cs index 45ca2c6..8e219d3 100644 --- a/Assets/Scripts/Oscillator.cs +++ b/Assets/Scripts/Oscillator.cs @@ -11,14 +11,12 @@ public class Oscillator : MonoBehaviour private Vector3 m_StartPosition; - void Start() - { + void Start(){ // Record the starting position of the object m_StartPosition = transform.position; } - void Update() - { + void Update(){ // Time-based oscillation float time = Time.time / m_Period; // Normalize time based on the period float offset = Mathf.Cos(2.0f * Mathf.PI * time); // Smooth oscillation between -1 and 1 @@ -28,5 +26,5 @@ void Update() // Update the transform position transform.position = pos; - } + } } diff --git a/Assets/Scripts/Rotator.cs b/Assets/Scripts/Rotator.cs index 8942fd6..d41d3d4 100644 --- a/Assets/Scripts/Rotator.cs +++ b/Assets/Scripts/Rotator.cs @@ -6,8 +6,7 @@ public class Rotator : MonoBehaviour [SerializeField, Tooltip("Speed of rotation")] public Vector3 rotationSpeed = new Vector3(0, 100, 0); - void Update() - { + void Update(){ transform.Rotate(rotationSpeed * Time.deltaTime); } } diff --git a/Assets/Scripts/mover.cs b/Assets/Scripts/mover.cs index 7b60157..f429e93 100644 --- a/Assets/Scripts/mover.cs +++ b/Assets/Scripts/mover.cs @@ -7,14 +7,12 @@ public class mover : MonoBehaviour float speed = 1.0f; // Start is called once before the first execution of Update after the MonoBehaviour is created - void Start() - { + void Start(){ //Debug.Log("Starting"); } // Update is called once per frame - void Update() - { + void Update(){ // GetComponent().Position += new Vector3(speed * Time.deltaTime, 0, 0); transform.position += new Vector3(speed * Time.deltaTime, 0, 0);