protected void Awake() { if (gameInst) { Destroy(gameInst); } gameInst = this; }
private void Awake() { if (_ == null) { _ = this; } else { Destroy(this.gameObject); } }
// 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>(); }