Exemplo n.º 1
0
 public void Apply(CarCreated e)
 {
     if (Id == default)
     {
         Id = e.AggregateId;
     }
     Model      = e.Model;
     HorsePower = e.HorsePower;
 }
Exemplo n.º 2
0
    // 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);
        }
    }
Exemplo n.º 3
0
 protected virtual void OnCarCreated(string model, CarType carType)
 {
     CarCreated?.Invoke(this, model, carType);
 }