//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void HandleLevelChange(int pDirection) { DestroyPrevLevel(); vPrevLevelObj = vCurrLevelObj; if (vPrevLevelObj != null) { vPrevLevelObj.name = "PrevLevel"; } //// vCurrLevelObj = new GameObject("CurrLevel"); vCurrLevelObj.transform.SetParent(gameObject.transform, false); UiLevel level = vCurrLevelObj.AddComponent <UiLevel>(); level.Build(vMenuState, vVisualSettingsProv); //// vChangeTime = DateTime.UtcNow; vChangeDir = pDirection; UpdateItemChangeAnim(); }
/*--------------------------------------------------------------------------------------------*/ internal void UpdateAfterSideChange() { vPrevLevelObj = vCurrLevelObj; DestroyPrevLevel(); vCurrLevelObj = new GameObject("CurrLevel"); vCurrLevelObj.transform.SetParent(gameObject.transform, false); vCurrLevelObj.transform.localScale = Vector3.one; UiLevel level = vCurrLevelObj.AddComponent <UiLevel>(); level.Build(vMenuState, vVisualSettingsProv); level.HandleChangeAnimation(true, 0, 1); }