Files
proto_racer/Assets/Scripts/CheckPoint.cs
T
krazzei 2b70c884ba Kinda lost the iteration aspect of this and just finished this prototype
up. So iteration 2 technically.
Cleaned up some CarLogic code, did todos notably the brake force.
Added the concept of wheels being on or off road and hampering
acceleration if off road.
Decided to do some camera work to get a better feel for
acceleration/speed.
Implemented Lap Timers, sections, and validation upon finishing a lap.
2021-02-19 13:29:23 -06:00

13 lines
201 B
C#

using System;
using UnityEngine;
public class CheckPoint : MonoBehaviour
{
public Action CarPassed;
private void OnTriggerEnter2D(Collider2D other)
{
CarPassed?.Invoke();
}
}