Ashby Issac fbeac39eb3 Gameplay system changes.
completed prototyping.
Integrated abstraction layer from previous project.
Refactored gameplay code.
Found an issue with drifting and added a quick fix for the same.
Added camera system for chasing player movement.
2026-01-05 19:59:43 +05:30

30 lines
533 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TimerSystem
{
private float timer = 10f;
private float timerIncrement = 5f;
public float Timer => timer;
public float TimerIncrement = 5f;
public TimerSystem()
{
CarController.OnCheckpointReached += UpdateTimer;
}
private void IncreaseTimer()
{
timer += timerIncrement;
}
public void UpdateTimer(float remTime)
{
timer = remTime;
IncreaseTimer();
}
}