Пример #1
0
    //Awake is always called before any Start functions
    void Awake()
    {
        //Check if instance already exists
        if (instance == null)
            instance = this;

        //If instance already exists and it's not this:
        else if (instance != this)
            Destroy(gameObject);

        DontDestroyOnLoad(gameObject);
    }
Пример #2
0
    //Awake is always called before any Start functions
    void Awake()
    {
        //Check if instance already exists
        if (instance == null)
        {
            instance = this;
        }

        //If instance already exists and it's not this:
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
Пример #3
0
 public void Awake()
 {
     countScript = GameObject.Find("CountObject").GetComponent<CountPoints>();
     audioSource = GameObject.Find("Audio Source");
     panelAnswer = GameObject.Find("PanelReponse");
     panelLoading = GameObject.Find("PanelLoading");
     //reponseText = GameObject.Find("Reponse");
     imageSon = GameObject.Find("ImageSon");
     votreReponse = GameObject.Find("VotreReponse");
     buttonSuivant = GameObject.Find("Suivante");
     check = GameObject.Find("Check");
     uncheck = GameObject.Find ("Uncheck");
     check.SetActive(false);
     uncheck.SetActive(false);
     panelAnswer.SetActive(false);
     panelLoading.SetActive(false);
 }
Пример #4
0
 public void Awake()
 {
     countScript  = GameObject.Find("CountObject").GetComponent <CountPoints>();
     audioSource  = GameObject.Find("Audio Source");
     panelAnswer  = GameObject.Find("PanelReponse");
     panelLoading = GameObject.Find("PanelLoading");
     //reponseText = GameObject.Find("Reponse");
     imageSon      = GameObject.Find("ImageSon");
     votreReponse  = GameObject.Find("VotreReponse");
     buttonSuivant = GameObject.Find("Suivante");
     check         = GameObject.Find("Check");
     uncheck       = GameObject.Find("Uncheck");
     check.SetActive(false);
     uncheck.SetActive(false);
     panelAnswer.SetActive(false);
     panelLoading.SetActive(false);
 }
Пример #5
0
 public void Awake()
 {
     countScript = GameObject.Find("CountObject").GetComponent<CountPoints>();
 }
Пример #6
0
 public void Awake()
 {
     countScript = GameObject.Find("CountObject").GetComponent <CountPoints>();
 }