// Start is called before the first frame update
    void Start()
    {
        player                 = GameObject.FindGameObjectWithTag("Player");
        _rigidbody             = player.GetComponent <Rigidbody>();
        panelTutorial          = FindObjectOfType <PanelTutorial>();
        forwardTrigger         = GameObject.FindGameObjectWithTag("ForwardTrigger").GetComponent <BoxCollider>();
        forwardTrigger.enabled = false;

        panelTutorial.btnBrake.onClick.AddListener(() => DisableKinematic());
    }
    // Start is called before the first frame update
    void Start()
    {
        player                 = GameObject.FindGameObjectWithTag("Player");
        _rigidbody             = player.GetComponent <Rigidbody>();
        panelTutorial          = FindObjectOfType <PanelTutorial>();
        forwardTrigger         = GameObject.FindGameObjectWithTag("ForwardTrigger").GetComponent <BoxCollider>();
        forwardTrigger.enabled = false;

        panelTutorial.btnBrake.onClick.AddListener(() => DisableKinematic());

        SetItemCoins();
        SetItemGas();

        if (CarController.instance != null)
        {
            CarController.instance.isStable = true;
        }
    }
示例#3
0
    // Update is called once per frame
    void Update()
    {
        if (Bplay.pulsado)
        {
            if (PlayerPrefs.GetInt("Tutorial") == 1 && Dificultad != 3 && Dificultad != 4)//Solo aparece el panel cuando esta el modo tutorial pero no esta en CR ni Supervivencia
            {
                PanelTutorial.SetActive(true);
            }


            _Bpausa.SetActive(true);
            Bplay.pulsado = false;
            grupoConfig.SetActive(false);
            Time.timeScale = 1;
        }


        if (Bpausa.pulsado)
        {
            PanelTutorial.SetActive(false);
            Bpausa.pulsado = false;
            grupoConfig.SetActive(true);
            Time.timeScale = 0;
            _Bpausa.SetActive(false);
        }
        if (Bmenu.pulsado)
        {
            ReiniciarMarcadores();
            Time.timeScale = 1;
            SceneManager.LoadScene("MainMenu");
        }
        if (Breintentar.pulsado)
        {
            ReiniciarMarcadores();
            Time.timeScale = 1;
            SceneManager.LoadScene("Oceano");
        }
    }
示例#4
0
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
     SetTutorialHoldThrottle();
     SetUpButton();
 }