private void Start() { RefreshHeartUi(); OnSceneChangeCallback += RearrangeObjectsBasedOnScene; OnSceneChangeCallback?.Invoke(false); onPlayerDieCallback += RefreshHeartUi; }
/// <summary> /// On game scene active /// </summary> private static void BSEvents_gameSceneActive() { ActiveScene = SceneType.Playing; if (OnSceneChange != null) { OnSceneChange.Invoke(ActiveScene); } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// /// <summary> /// On menu scene active /// </summary> private static void BSEvents_menuSceneActive() { ActiveScene = SceneType.Menu; if (OnSceneChange != null) { OnSceneChange.Invoke(ActiveScene); } }
private void ActiveSceneChanged(Scene oldScene, Scene newScene) { if (oldScene.name != null) { NestedScope.Save(); } NestedScope = new T(); OnSceneChange?.Invoke(NestedScope, newScene); (NestedScope as ScopePlayerPrefs)?.Setup(newScene.name); NestedScope.Init(); }
internal void SceneChange(Scene scene) { OnSceneChange?.Invoke(this, new SceneEventArgs(scene)); }
public void ChangeScene(int index) { OnSceneChange?.Invoke(); SceneManager.LoadScene(index); }