RandomGFGoStop/Assets/Scripts/SingletonManagers/Managers/TimeManager.cs

20 lines
431 B
C#
Raw Normal View History

2025-08-27 21:08:17 +00:00
using UnityEngine;
public class TimeManager : MonoBehaviour
{
public static readonly float[] GAME_SPEEDS = new float[3]{ 1, 1.5f, 2 };
public static float GAME_SPEED = 1;
public void ChangeGameSpeed(int index)
{
if (index < 0 || index >= GAME_SPEEDS.Length)
{
GAME_SPEED = GAME_SPEEDS[0];
}
else
{
GAME_SPEED = GAME_SPEEDS[index];
}
}
}