public void InvokeFailure() { //lastSceneState = LastSceneState.FAILURE; //LoadMinigame(SceneIndex); UI_Minigame minigameUI = GameObject.FindWithTag("UI").GetComponent <UI_Minigame>(); minigameUI.state = UI_Minigame.State.fail; }
// 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>(); }