コード例 #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>();
 }