void OnLevelWasLoaded(int sceneInd) { InitScene(); if (mCheckPoint != null && mCurSceneStr == mCheckPointForScene) { mSceneController.OnCheckPoint(mCheckPoint); } mCheckPoint = null; mCheckPointForScene = ""; if (screenTransition.state == ScreenTransition.State.Done) //we were at out a while back { mFirstTime = false; StartCoroutine(DoScreenTransitionIn()); } }
//happens during onlevelwasloaded public virtual void OnCheckPoint(SceneCheckpoint point) { mStartState = !string.IsNullOrEmpty(point.state) ? point.state : null; }
void OnLevelWasLoaded(int sceneInd) { InitScene(); if(mCheckPoint != null && mCurSceneStr == mCheckPointForScene) { mSceneController.OnCheckPoint(mCheckPoint); } mCheckPoint = null; mCheckPointForScene = ""; if(screenTransition.state == ScreenTransition.State.Done) { //we were at out a while back mFirstTime = false; StartCoroutine(DoScreenTransitionIn()); } }
public void SetCheckPoint(SceneCheckpoint check) { mCheckPointForScene = mCurSceneStr; mCheckPoint = check; }
public override void OnCheckPoint(SceneCheckpoint point) { base.OnCheckPoint(point); mCheckpoint = (LevelCheckpoint)point; }
void OnLevelWasLoaded(int sceneInd) { //refresh roots, excluding main mRoots.Clear(); Transform[] trans = (Transform[])FindObjectsOfType(typeof(Transform)); foreach(Transform tran in trans) { if(tran.parent == null && tran != transform) { mRoots.Add(tran); } } InitScene(); if(mCheckPoint != null && mCurSceneStr == mCheckPointForScene) { mSceneController.OnCheckPoint(mCheckPoint); } mCheckPoint = null; mCheckPointForScene = ""; if(screenTransition.state == ScreenTransition.State.Done) { //we were at out a while back mFirstTime = false; StartCoroutine(DoScreenTransitionIn()); } }