void FixedUpdate() { if (gameModeLayer.activeSelf) { activeMode = gameModeScroller.CurrentScreen(); if (activeMode != prevMode) { if (activeMode == 0) { ScrollDown.BroadcastMessage("FadeOut", null, SendMessageOptions.DontRequireReceiver); } else if (prevMode == 0) { ScrollDown.BroadcastMessage("FadeIn", null, SendMessageOptions.DontRequireReceiver); } else if (activeMode == 4) { ScrollUp.BroadcastMessage("FadeOut", null, SendMessageOptions.DontRequireReceiver); } else if (prevMode == 4) { ScrollUp.BroadcastMessage("FadeIn", null, SendMessageOptions.DontRequireReceiver); } } prevMode = activeMode; } }
// Update is called once per frame void FixedUpdate() { //check to make sure the scores for the proper scope and mode are on display, and if they aren't, change them if (Scopes.gameObject.activeInHierarchy) { currScope = Scopes.CurrentScreen(); currMode = Modes.CurrentScreen(); if (currScope != prevScope || currMode != prevMode) { Populate_Scores_List(); } prevScope = currScope; prevMode = currMode; } }