예제 #1
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);
        }
    }
    // Start is called before the first frame update
    private void Start()
    {
        objectRB = GetComponent <Rigidbody>();

        if (GameStateManager.PlayerSelectedCar)
        {
            //Get multipliers from the game state manager and apply those to our default values
            moveSpeed      *= GameStateManager.PlayerSelectedCar.speedMutiplier;
            rotationAmount *= GameStateManager.PlayerSelectedCar.handilingMutiplier;
        }

        //Start playing car audio
        if (engineAudioSource && engineSound)
        {
            engineAudioSource.PlaySFXLoop(engineSound);
        }
    }