Exemple #1
0
 protected void Awake()
 {
     if (gameInst)
     {
         Destroy(gameInst);
     }
     gameInst = this;
 }
Exemple #2
0
 private void Awake()
 {
     if (_ == null)
     {
         _ = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     minigameLoader = GameObject.FindWithTag("MinigameLoader").GetComponent <MinigameLoader>();
     spriteRenderer = this.transform.GetChild(0).GetComponent <SpriteRenderer>();
     UI_Minigame    = GameObject.FindWithTag("UI").GetComponent <UI_Minigame>();
 }