Add files via upload

Some first day fug fixes.
This commit is contained in:
Geri 2021-01-09 01:57:59 +01:00 committed by GitHub
parent 7046716893
commit a29bc6aba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 123 additions and 10 deletions

View file

@ -10,6 +10,9 @@ public static class Loader{
static Action onLoaderCallback;
static AsyncOperation loadingAsyncOperation;
/// <summary>Load a scene with a loading scene
/// <para>It requires a scene called "Loading" where the loading screen is located.</para>
/// </summary>
public static void Load(int scene){
onLoaderCallback = () => {
GameObject loadingGameObject = new GameObject("LoadingGameObject");
@ -18,6 +21,9 @@ public static class Loader{
SceneManager.LoadScene("Loading");
}
/// <summary>Load a scene with a loading scene
/// <para>It requires a scene called "Loading" where the loading screen is located.</para>
/// </summary>
public static void Load(string scene){
onLoaderCallback = () => {
GameObject loadingGameObject = new GameObject("LoadingGameObject");
@ -44,6 +50,8 @@ public static class Loader{
}
}
/// <summary>Returns the loading progress
/// </summary>
public static float GetLoadingProgress(){
if(loadingAsyncOperation != null){
return loadingAsyncOperation.progress;