Started making main menu
This commit is contained in:
@@ -21,15 +21,20 @@ namespace Fruitomation.Game
|
||||
}
|
||||
|
||||
Instance = this;
|
||||
|
||||
|
||||
Canvas canvas = gameObject.AddComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
|
||||
|
||||
GameObject overlayGo = new("Overlay");
|
||||
overlayGo.transform.SetParent(canvas.transform);
|
||||
|
||||
|
||||
Transition = overlayGo.AddComponent<SceneControllerTransition>();
|
||||
Transition.OnCreation(canvas);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
#else // Only does start transition on non editor builds
|
||||
StartCoroutine(EndLoadInternal(2.5f));
|
||||
#endif
|
||||
}
|
||||
|
||||
private const float FadeMultiplier = 4f;
|
||||
@@ -61,9 +66,10 @@ namespace Fruitomation.Game
|
||||
operation.allowSceneActivation = true;
|
||||
}
|
||||
|
||||
private IEnumerator EndLoadInternal()
|
||||
private IEnumerator EndLoadInternal(float waitTime = 0.2f)
|
||||
{
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
Transition.LerpValue = 1f;
|
||||
yield return new WaitForSecondsRealtime(waitTime);
|
||||
Transition.GoingUp = true;
|
||||
|
||||
float lerp = 0f;
|
||||
|
||||
Reference in New Issue
Block a user