Пример #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.name == "Trigger")
     {
         VehicleBehaviour.WheelVehicle vehicle = other.GetComponentInParent <VehicleBehaviour.WheelVehicle> ();
         if (vehicle)
         {
             vehicle.Jumppad(jumpforce);
         }
     }
 }
Пример #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.name == "Trigger")
     {
         VehicleBehaviour.WheelVehicle vehicle = other.GetComponentInParent <VehicleBehaviour.WheelVehicle>();
         if (vehicle)
         {
             vehicle.allowBoost = true;
         }
     }
 }
Пример #3
0
        public GhostRecorder(float duration, int freq, ref WheelVehicle vehicle)
        {
            _vehicle  = vehicle;
            _vehicleT = vehicle.transform;
            _vehicleR = vehicle.GetComponent <Rigidbody>();


            this.duration = duration;
            this.freq     = freq;

            _data = new List <GhostData>((int)(this.duration * this.freq));
        }
Пример #4
0
    void Start()
    {
        wheelVehicle         = GetComponent <VehicleBehaviour.WheelVehicle>();
        wheelVehicle.enabled = false;

        engineSoundManager         = GetComponent <VehicleBehaviour.EngineSoundManager>();
        engineSoundManager.enabled = false;

        //cam = GetComponent<VehicleBehaviour.Utils.CameraFollow>();
        //cam.enabled = false;

        //source = GetComponent<AudioSource>();

        //cam.enabled = false;
        playerBackUp.SetActive(false);
    }
Пример #5
0
 void Start()
 {
     _source  = GetComponent <AudioSource>();
     _vehicle = GetComponent <WheelVehicle>();
 }