Развитие гоночек

This commit is contained in:
ThomasCharester committed 2026-02-06 10:30:50 +03:00
1 parent ec60c47652
commit b54083521f
532 files changed
+16091 -28231

No files matched your search

+11 -1
View File
@@ -1,14 +1,24 @@
using Code.Example.Race.Racer.AI;
using Code.Infrastructure.EventBus;
using Reflex.Attributes;
using UnityEngine;
namespace Code.Example.Race.Track
{
public class CheckPoint : MonoBehaviour
{
[Inject] private EventBus _eventBus;
private void OnTriggerEnter(Collider other)
{
var racer = other.GetComponent<AIDebugRacer>();
var racer = other.GetComponent<Racer.AI.Racer>();
racer.NextWaypoint();
_eventBus.RaiseEvent<IRacerPassedCheckpointHandler>(h => h.OnRacerPassedCheckpoint(racer));
}
}
public interface IRacerPassedCheckpointHandler : IGlobalSubscriber
{
void OnRacerPassedCheckpoint(Racer.AI.Racer racer);
}
}