Example #1
0
        public CarBase CreateEnemyCar(PlayerCarModel model, int colorId)
        {
            CarBase _enemyCar = CreateCar(model);

            _enemyCar.Transform.position = new Vector3(0f, 3f, -2f);
            _enemyCar.SetColorInGame(colorId);
            _enemyCar.transform.tag = "Enemy";
            return(_enemyCar);
        }
Example #2
0
        public void Init(CarBase car)
        {
            _audioService = Core.Instance.GetService <AudioService>();
            Assert.AreNotEqual(null, _audioService);

            #region createing nitro audio emitter

            _audioService.CreateEmitterNitro();
            #endregion
            _audioService.CreateEmitterNitroEmpty();

            _playerCar = car;

            maxNitro  = (float)Math.Round(NitroDuration / Time.fixedDeltaTime, 0);
            nitroPlus = (float)Math.Round(nitroMinus / NitroRecovery, 2);

            nitroDelayMax = (float)Math.Round(NitroDelay / Time.fixedDeltaTime, 0);

            m_rigidbody = GetComponent <Rigidbody>();

            nitroCurrent = maxNitro;
        }
Example #3
0
 public void ChangeCarSkin(CarBase car /*, car options */)
 {
     car.ApplyCarSkin();
 }
Example #4
0
 public void UpgradeCar(CarBase car /*, car options */)
 {
     car.ApplyCarPart();
 }