public void Apply(CarCreated e) { if (Id == default) { Id = e.AggregateId; } Model = e.Model; HorsePower = e.HorsePower; }
// Start is called before the first frame update private new void Start() { base.Start(); CarCreated?.Invoke(this); carAIChase = GetComponent <AICarChase>(); controllingCar = GetComponent <CarPhysics>(); //Start Siren Sound if (sirenSource & sirenSound) { sirenSource.PlaySFXLoop(sirenSound); } }
protected virtual void OnCarCreated(string model, CarType carType) { CarCreated?.Invoke(this, model, carType); }