Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        slowMotionMaxCounter = slowMotionLeftCounter;
        AudioManager.instance.Play("CarSound");
        rb     = movable.GetComponent <Rigidbody>();
        angles = movable.localEulerAngles;

        if (playerController == null)
        {
            playerController = this;
        }
        else
        {
            Destroy(this);
        }

        yAxis = MenuSettings.getInvertedControls() ? 1f : -1f;
    }
Beispiel #2
0
 public void OnEnable()
 {
     invertedSwitch.isOn = MenuSettings.getInvertedControls();
     carSwitch.isOn      = MenuSettings.getCarInUse();
 }