public void HandleScreenSwitch(BIJ_UI_Screen aScreen, bool isBackCall) { if (aScreen) { if (currentScreen) { currentScreen.CloseScreen(); if (!isBackCall) { screenStack.Push(currentScreen); } //previousScreen = currentScreen; } currentScreen = aScreen; currentScreen.gameObject.SetActive(true); currentScreen.StartScreen(); if (onSwitchedScreen != null) { onSwitchedScreen.Invoke(); } } }
public void SwitchScreen(BIJ_UI_Screen aScreen) { HandleScreenSwitch(aScreen, false); }