Пример #1
0
 public void Setup(IDynamicWorldObject vehicle)
 {
     this.Unsubscribe();
     this.vehicle            = vehicle;
     this.vehiclePublicState = vehicle.GetPublicState <VehiclePublicState>();
     this.Subscribe();
     this.Refresh();
 }
Пример #2
0
        public void Setup(
            IDynamicWorldObject vehicle,
            SoundResource soundResourceEngine,
            double volume)
        {
            this.vehicle             = vehicle;
            this.soundResourceEngine = soundResourceEngine;
            this.Volume = volume;

            this.ReleaseSubscriptions();
            this.vehiclePublicState = vehicle.GetPublicState <VehiclePublicState>();
            this.vehiclePublicState.ClientSubscribe(p => p.PilotCharacter,
                                                    this.RebuildSoundEmitter,
                                                    this);

            this.RebuildSoundEmitter();
        }