Insanely huge initial commit

This commit is contained in:
2026-02-21 16:40:15 -08:00
parent 2ba1c94b88
commit ee9aee0a1b
33825 changed files with 5213498 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using MoreMountains.Tools;
using UnityEngine.SceneManagement;
namespace MoreMountains.Tools
{
/// <summary>
/// Add this component on an object, specify a scene name in its inspector, and call LoadScene() to load the desired scene.
/// </summary>
public class MMLoadScene : MonoBehaviour
{
/// the possible modes to load scenes. Either Unity's native API, or MoreMountains' LoadingSceneManager
public enum LoadingSceneModes { UnityNative, MMSceneLoadingManager, MMAdditiveSceneLoadingManager }
/// the name of the scene that needs to be loaded when LoadScene gets called
[Tooltip("the name of the scene that needs to be loaded when LoadScene gets called")]
public string SceneName;
/// defines whether the scene will be loaded using Unity's native API or MoreMountains' way
[Tooltip("defines whether the scene will be loaded using Unity's native API or MoreMountains' way")]
public LoadingSceneModes LoadingSceneMode = LoadingSceneModes.UnityNative;
/// <summary>
/// Loads the scene specified in the inspector
/// </summary>
public virtual void LoadScene()
{
switch (LoadingSceneMode)
{
case LoadingSceneModes.UnityNative:
SceneManager.LoadScene (SceneName);
break;
case LoadingSceneModes.MMSceneLoadingManager:
MMSceneLoadingManager.LoadScene (SceneName);
break;
case LoadingSceneModes.MMAdditiveSceneLoadingManager:
MMAdditiveSceneLoadingManager.LoadScene(SceneName);
break;
}
}
}
}

View File

@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: d9251a9f35d2c384a9e26195e0c63ee9
timeCreated: 1523971212
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace MoreMountains.Tools
{
/// <summary>
/// A very simple class, meant to be used within a MMSceneLoading screen, to update the fill amount of an Image
/// based on loading progress
/// </summary>
public class MMSceneLoadingImageProgress : MonoBehaviour
{
protected Image _image;
/// <summary>
/// On Awake we store our Image
/// </summary>
protected virtual void Awake()
{
_image = this.gameObject.GetComponent<Image>();
}
/// <summary>
/// Meant to be called by the MMSceneLoadingManager, turns the progress of a load into fill amount
/// </summary>
/// <param name="newValue"></param>
public virtual void SetProgress(float newValue)
{
_image.fillAmount = newValue;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 32002db2f9b16ed45ac2cfd0f37f96e4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,46 @@
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
using UnityEngine.UI;
namespace MoreMountains.Tools
{
/// <summary>
/// A very simple class, meant to be used within a MMSceneLoading screen, to update a Text
/// based on loading progress
/// </summary>
public class MMSceneLoadingTextProgress : MonoBehaviour
{
/// the value to which the progress' zero value should be remapped to
[Tooltip("the value to which the progress' zero value should be remapped to")]
public float RemapMin = 0f;
/// the value to which the progress' one value should be remapped to
[Tooltip("the value to which the progress' one value should be remapped to")]
public float RemapMax = 100f;
/// the amount of decimals to display
[Tooltip("the amount of decimals to display")]
public int NumberOfDecimals = 0;
protected Text _text;
/// <summary>
/// On Awake we grab our Text and store it
/// </summary>
protected virtual void Awake()
{
_text = this.gameObject.GetComponent<Text>();
}
/// <summary>
/// Updates the Text with the progress value
/// </summary>
/// <param name="newValue"></param>
public virtual void SetProgress(float newValue)
{
float remappedValue = MMMaths.Remap(newValue, 0f, 1f, RemapMin, RemapMax);
float displayValue = MMMaths.RoundToDecimal(remappedValue, NumberOfDecimals);
_text.text = displayValue.ToString(CultureInfo.InvariantCulture);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a6b4439955a5ebf4eaa4285bc875fcc6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: