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.
13 lines
201 B
C#
13 lines
201 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class CheckPoint : MonoBehaviour
|
|
{
|
|
public Action CarPassed;
|
|
|
|
private void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
CarPassed?.Invoke();
|
|
}
|
|
}
|