Added comments to everything
This commit is contained in:
@@ -1,19 +1,31 @@
|
||||
using Game;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// This class controls the visibility of the obstacle end object based on the current game mode.
|
||||
/// </summary>
|
||||
public class ObstacleEnd : MonoBehaviour
|
||||
{
|
||||
void Start()
|
||||
/// <summary>
|
||||
/// Initializes the visibility of the object when the game starts.
|
||||
/// </summary>
|
||||
private void Start()
|
||||
{
|
||||
UpdateVisibility();
|
||||
}
|
||||
|
||||
void Update()
|
||||
/// <summary>
|
||||
/// Updates the visibility of the object every frame.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
UpdateVisibility();
|
||||
}
|
||||
|
||||
private void UpdateVisibility() // Sets object active if playing obstacle course
|
||||
/// <summary>
|
||||
/// Sets the object to be active only if the game mode is "Obstacle Course".
|
||||
/// </summary>
|
||||
private void UpdateVisibility()
|
||||
{
|
||||
if (GameManager.gameMode == GameManager.GameMode.obstacleCourse)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user