Insanely huge initial commit

This commit is contained in:
2026-02-21 17:04:05 -08:00
parent 9cdd36191a
commit 613d75914a
22525 changed files with 4035207 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4b0c11e0a4798e04c82c84e3f89de5e2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MoreMountains.Tools
{
/// <summary>
/// A test class used to demonstrate the MMObservable in the MMObservableTest demo scene
/// </summary>
public class MMObservableDemoObserver : MonoBehaviour
{
/// the subject to look at
public MMObservableDemoSubject TargetSubject;
/// <summary>
/// When the position changes, we move our object accordingly on the y axis
/// </summary>
protected virtual void OnPositionChange()
{
this.transform.position = this.transform.position.MMSetY(TargetSubject.PositionX.Value);
}
/// <summary>
/// On enable we start listening for changes
/// </summary>
protected virtual void OnEnable()
{
TargetSubject.PositionX.OnValueChanged += OnPositionChange;
}
/// <summary>
/// On enable we stop listening for changes
/// </summary>
protected virtual void OnDisable()
{
TargetSubject.PositionX.OnValueChanged -= OnPositionChange;
}
}
}

View File

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

View File

@@ -0,0 +1,53 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MoreMountains.Tools
{
/// <summary>
/// A test class used to demonstrate the MMObservable pattern in the MMObservableDemo scene
/// This one disables itself on Awake, and passively listens for changes, even when disabled
/// </summary>
public class MMObservableDemoObserverAutoSleep : MonoBehaviour
{
public MMObservableDemoSubject TargetSubject;
protected virtual void OnSpeedChange()
{
this.transform.position = this.transform.position.MMSetY(TargetSubject.PositionX.Value);
}
/// <summary>
/// On awake we start listening for changes
/// </summary>
protected virtual void Awake()
{
TargetSubject.PositionX.OnValueChanged += OnSpeedChange;
this.enabled = false;
}
/// <summary>
/// On destroy we stop listening for changes
/// </summary>
protected virtual void OnDestroy()
{
TargetSubject.PositionX.OnValueChanged -= OnSpeedChange;
}
/// <summary>
/// On enable we do nothing
/// </summary>
protected virtual void OnEnable()
{
}
/// <summary>
/// On disable we do nothing
/// </summary>
protected virtual void OnDisable()
{
}
}
}

View File

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

View File

@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MoreMountains.Tools
{
/// <summary>
/// A test class used to demonstrate how MMObservable works in the MMObservableTest demo scene
/// </summary>
public class MMObservableDemoSubject : MonoBehaviour
{
/// a public float we expose, outputting the x position of our object
public MMObservable<float> PositionX = new MMObservable<float>();
/// <summary>
/// On Update we update our x position
/// </summary>
protected virtual void Update()
{
PositionX.Value = this.transform.position.x;
}
}
}

View File

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