예제 #1
0
 void Start()
 {
     // Ensure singleton
     if (SumPause.instance == null)
     {
         SumPause.instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
예제 #2
0
    private void Start()
    {
        if (SumPause.instance == null)
        {
            SumPause.instance = this;
        }
        else
        {
            Destroy(this);
        }

        glueCam     = FindObjectOfType <GlueCam>();
        musicPlayer = FindObjectOfType <MusicPlayer>();
        player      = FindObjectOfType <Player>();
    }