mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
Unified line endings
* Unified all line endings in project to align with .editorconfig; all end-of-line characters have been set to LF and new-lines placed at the end of every file if not present.
This commit is contained in:
parent
e5f6659eda
commit
7763f81ede
@ -1,24 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace UnityAtoms {
|
||||
/// <summary>
|
||||
/// This is basically an IList without everything that could mutate the list
|
||||
/// </summary>
|
||||
public class ReadOnlyList<T> : IEnumerable, IEnumerable<T> {
|
||||
private readonly IList<T> referenceList;
|
||||
|
||||
|
||||
public ReadOnlyList(IList<T> referenceList) { this.referenceList = referenceList; }
|
||||
|
||||
|
||||
public IEnumerator<T> GetEnumerator() { return referenceList.GetEnumerator(); }
|
||||
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); }
|
||||
|
||||
|
||||
public bool Contains(T item) { return referenceList.Contains(item); }
|
||||
public int IndexOf(T item) { return referenceList.IndexOf(item); }
|
||||
|
||||
|
||||
public void CopyTo(T[] array, int arrayIndex) { referenceList.CopyTo(array, arrayIndex); }
|
||||
|
||||
|
||||
public int Count {
|
||||
get { return referenceList.Count; }
|
||||
}
|
||||
@ -32,4 +32,4 @@ using System.Collections;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,4 @@ namespace UnityAtoms
|
||||
{
|
||||
void OnEventRaised(T1 first, T2 second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,4 +26,4 @@ namespace UnityAtoms
|
||||
{
|
||||
public abstract void Do(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,4 +24,4 @@ namespace UnityAtoms
|
||||
return reference.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,4 @@ namespace UnityAtoms
|
||||
return (t1 == null && t2 == null) || (t1 != null && t1.Equals(t2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,4 @@ namespace UnityAtoms
|
||||
bool ApplyChange(T amount);
|
||||
bool ApplyChange(EquatableScriptableObjectVariable<T, E1, E2> amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
T OldValue { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
T Value { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,4 +34,4 @@ namespace UnityAtoms
|
||||
public static bool operator ==(ScriptableObjectVariableBase<T> left, ScriptableObjectVariableBase<T> right) { return Equals(left, right); }
|
||||
public static bool operator !=(ScriptableObjectVariableBase<T> left, ScriptableObjectVariableBase<T> right) { return !Equals(left, right); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolAction : GameAction<bool> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Event x 2", fileName = "BoolBoolEvent", order = CreateAssetMenuUtils.Order.EVENTx2)]
|
||||
public class BoolBoolEvent : GameEvent<bool, bool> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Constant", fileName = "BoolConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
|
||||
public class BoolConstant : ScriptableObjectVariableBase<bool> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Event", fileName = "BoolEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class BoolEvent : GameEvent<bool> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Bool/List", fileName = "BoolList", order = CreateAssetMenuUtils.Order.LIST)]
|
||||
public class BoolList : ScriptableObjectList<bool, BoolEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class BoolReference : ScriptableObjectReference<bool, BoolVariable, BoolEvent, BoolBoolEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Variable", fileName = "BoolVariable", order = CreateAssetMenuUtils.Order.VARIABLE)]
|
||||
public class BoolVariable : EquatableScriptableObjectVariable<bool, BoolEvent, BoolBoolEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Set Variable", fileName = "SetBoolVariableValueAction", order = CreateAssetMenuUtils.Order.SET_VARIABLE)]
|
||||
public class SetBoolVariableValue : SetVariableValue<bool, BoolVariable, BoolReference, BoolEvent, BoolBoolEvent> { }
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Set Variable", fileName = "SetBoolVariableValueAction", order = CreateAssetMenuUtils.Order.SET_VARIABLE)]
|
||||
public class SetBoolVariableValue : SetVariableValue<bool, BoolVariable, BoolReference, BoolEvent, BoolBoolEvent> { }
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityBoolEvent : UnityEvent<bool> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Collider/Event", fileName = "ColliderEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class ColliderEvent : GameEvent<Collider> { }
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Collider/Event", fileName = "ColliderEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class ColliderEvent : GameEvent<Collider> { }
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class ColliderGameObjectAction : GameAction<Collider, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Collider/Event with GameObject", fileName = "ColliderGameObjectEvent", order = CreateAssetMenuUtils.Order.EVENT_WITH_GO)]
|
||||
public class ColliderGameObjectEvent : GameEvent<Collider, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityColliderGameObjectEvent : UnityEvent<Collider, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class Collider2DAction : GameAction<Collider2D> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Collider2D/Event", fileName = "Collider2DEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class Collider2DEvent : GameEvent<Collider2D> { }
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Collider2D/Event", fileName = "Collider2DEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class Collider2DEvent : GameEvent<Collider2D> { }
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class Collider2DEventAction : GameAction<Collider2DEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class Collider2DGameObjectAction : GameAction<Collider2D, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Collider2D/Event with GameObject", fileName = "Collider2DGameObjectEvent", order = CreateAssetMenuUtils.Order.EVENT_WITH_GO)]
|
||||
public class Collider2DGameObjectEvent : GameEvent<Collider2D, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Collider2D/List", fileName = "Collider2DList", order = CreateAssetMenuUtils.Order.LIST)]
|
||||
public class Collider2DList : ScriptableObjectList<Collider2D, Collider2DEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class Collider2DListAction : GameAction<Collider2DList> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class Collider2DListGameObjectAction : GameAction<Collider2DList, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -11,4 +11,4 @@ namespace UnityAtoms
|
||||
Collider2DHook
|
||||
>
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public class CreateCollider2DListOnAwake : CreateListOnAwake<Collider2D, Collider2DList, Collider2DEvent, Collider2DListener, Collider2DAction, Collider2DListAction, Collider2DListGameObjectAction, UnityCollider2DEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityCollider2DEvent : UnityEvent<Collider2D> { }
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityCollider2DGameObjectEvent : UnityEvent<Collider2D, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class ColorAction : GameAction<Color> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Color/Event x 2", fileName = "ColorColorEvent", order = CreateAssetMenuUtils.Order.EVENTx2)]
|
||||
public class ColorColorEvent : GameEvent<Color, Color> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Color/Constant", fileName = "ColorConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
|
||||
public class ColorConstant : ScriptableObjectVariableBase<Color> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Color/Event", fileName = "ColorEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class ColorEvent : GameEvent<Color> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Color/List", fileName = "ColorList", order = CreateAssetMenuUtils.Order.LIST)]
|
||||
public class ColorList : ScriptableObjectList<Color, ColorEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class ColorReference : ScriptableObjectReference<Color, ColorVariable, ColorEvent, ColorColorEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,4 @@ namespace UnityAtoms
|
||||
return first.Equals(second);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Color/Set Variable", fileName = "SetColorVariableValueAction", order = CreateAssetMenuUtils.Order.SET_VARIABLE)]
|
||||
public class SetColorVariableValue : SetVariableValue<Color, ColorVariable, ColorReference, ColorEvent, ColorColorEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityColorEvent : UnityEvent<Color> { }
|
||||
}
|
||||
}
|
||||
|
@ -45,4 +45,4 @@ namespace UnityAtoms
|
||||
|
||||
[CustomEditor(typeof(VoidEvent))]
|
||||
public class VoidEventEditor : GameEventEditor<Void, VoidEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -74,4 +74,4 @@ namespace UnityAtoms
|
||||
[CustomPropertyDrawer(typeof(Vector3Reference))]
|
||||
public class Vector3ReferenceDrawer : ReferenceDrawer { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,4 +14,4 @@ namespace UnityAtoms.Extensions
|
||||
return array[Random.Range(0, array.Length)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,4 +14,4 @@ namespace UnityAtoms.Extensions
|
||||
return camera.GetOrthographicWorldScreenHeight() / Screen.height * Screen.width; ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,4 +42,4 @@ namespace UnityAtoms.Extensions
|
||||
return mb.gameObject.GetOrAddComponent<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ namespace UnityAtoms.Extensions
|
||||
public static class TransformExtensions
|
||||
{
|
||||
|
||||
/* Finds a child to this transform by name. Searches not only the first level in the
|
||||
* tree hierarchy of child objects, but all the children, grand children, and so on.
|
||||
/* Finds a child to this transform by name. Searches not only the first level in the
|
||||
* tree hierarchy of child objects, but all the children, grand children, and so on.
|
||||
*/
|
||||
public static Transform FindDeepChild(this Transform parent, string name)
|
||||
{
|
||||
|
@ -20,4 +20,4 @@ namespace UnityAtoms.Extensions
|
||||
return v2 + (distance.normalized * maxDistance);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,4 +25,4 @@ namespace UnityAtoms.Extensions
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class FloatAction : GameAction<float> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Float/Constant", fileName = "FloatConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
|
||||
public class FloatConstant : ScriptableObjectVariableBase<float> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Float/Event", fileName = "FloatEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class FloatEvent : GameEvent<float> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Float/Event x 2", fileName = "FloatFloatEvent", order = CreateAssetMenuUtils.Order.EVENTx2)]
|
||||
public class FloatFloatEvent : GameEvent<float, float> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Float/List", fileName = "FloatList", order = CreateAssetMenuUtils.Order.LIST)]
|
||||
public class FloatList : ScriptableObjectList<float, FloatEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class FloatReference : ScriptableObjectReference<float, FloatVariable, FloatEvent, FloatFloatEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,4 @@ namespace UnityAtoms
|
||||
return SetValue(Value + amount.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Float/Set Variable", fileName = "SetFloatVariableValueAction", order = CreateAssetMenuUtils.Order.SET_VARIABLE)]
|
||||
public class SetFloatVariableValue : SetVariableValue<float, FloatVariable, FloatReference, FloatEvent, FloatFloatEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityFloatEvent : UnityEvent<float> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolBoolFunction : GameFunction<bool, bool> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolColorFunction : GameFunction<bool, Color> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolFloatFunction : GameFunction<bool, float> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolFunction : GameFunction<bool> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolGameObjectFunction : GameFunction<bool, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolIntFunction : GameFunction<bool, int> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolVector2Function : GameFunction<bool, Vector2> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolVector3Function : GameFunction<bool, Vector3> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class BoolVoidFunction : GameFunction<bool, Void> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class GameObjectFunction : GameFunction<GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class GameObjectGameObjectFunction : GameFunction<GameObject, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class GameObjectVector3QuaternionFunction : GameFunction<GameObject, Vector3, Quaternion> { }
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class GameObjectVector3QuaternionFunction : GameFunction<GameObject, Vector3, Quaternion> { }
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class IntFunction : GameFunction<int> { }
|
||||
}
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class IntFunction : GameFunction<int> { }
|
||||
}
|
||||
|
@ -31,4 +31,4 @@ namespace UnityAtoms
|
||||
{
|
||||
public abstract R Call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class GameObjectAction : GameAction<GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/GameObject/Event", fileName = "GameObjectEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class GameObjectEvent : GameEvent<GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/GameObject/Event x 2", fileName = "GameObjectGameObjectEvent", order = CreateAssetMenuUtils.Order.EVENTx2)]
|
||||
public class GameObjectGameObjectEvent : GameEvent<GameObject, GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/GameObject/List", fileName = "GameObjectList", order = CreateAssetMenuUtils.Order.LIST)]
|
||||
public class GameObjectList : ScriptableObjectList<GameObject, GameObjectEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class GameObjectListAction : GameAction<GameObjectList> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class GameObjectReference : ScriptableObjectReference<GameObject, GameObjectVariable, GameObjectEvent, GameObjectGameObjectEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,4 @@ namespace UnityAtoms
|
||||
return (first == null && second == null) || first != null && second != null && first.GetInstanceID() == second.GetInstanceID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/GameObject/Set Variable", fileName = "SetGameObjectVariableValueAction", order = CreateAssetMenuUtils.Order.SET_VARIABLE)]
|
||||
public class SetGameObjectVariableValue : SetVariableValue<GameObject, GameObjectVariable, GameObjectReference, GameObjectEvent, GameObjectGameObjectEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityGameObjectEvent : UnityEvent<GameObject> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class IntAction : GameAction<int> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Int/Constant", fileName = "IntConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
|
||||
public class IntConstant : ScriptableObjectVariableBase<int> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Int/Event", fileName = "IntEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class IntEvent : GameEvent<int> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Int/Event x 2", fileName = "IntIntEvent", order = CreateAssetMenuUtils.Order.EVENTx2)]
|
||||
public class IntIntEvent : GameEvent<int, int> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Int/List", fileName = "IntList", order = CreateAssetMenuUtils.Order.LIST)]
|
||||
public class IntList : ScriptableObjectList<int, IntEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class IntReference : ScriptableObjectReference<int, IntVariable, IntEvent, IntIntEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,4 @@ namespace UnityAtoms
|
||||
return SetValue(Value + amount.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Int/Set Variable", fileName = "SetIntVariableValueAction", order = CreateAssetMenuUtils.Order.SET_VARIABLE)]
|
||||
public class SetIntVariableValue : SetVariableValue<int, IntVariable, IntReference, IntEvent, IntIntEvent> { }
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityIntEvent : UnityEvent<int> { }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Mobile/Touch User Input/Event", fileName = "TouchUserInputEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class TouchUserInputGameEvent : GameEvent<TouchUserInput> { }
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Mobile/Touch User Input/Event", fileName = "TouchUserInputEvent", order = CreateAssetMenuUtils.Order.EVENT)]
|
||||
public class TouchUserInputGameEvent : GameEvent<TouchUserInput> { }
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
public class TouchUserInputListener : GameEventListener<TouchUserInput, TouchUserInputAction, TouchUserInputGameEvent, UnityTouchUserInputEvent> { }
|
||||
}
|
||||
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
public class TouchUserInputListener : GameEventListener<TouchUserInput, TouchUserInputAction, TouchUserInputGameEvent, UnityTouchUserInputEvent> { }
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
public class TouchUserInputTouchUserInputListener : GameEventListener<TouchUserInput, TouchUserInput, TouchUserInputTouchUserInputAction, TouchUserInputTouchUserInputGameEvent, UnityTouchUserInputTouchUserInputEvent> { }
|
||||
}
|
||||
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
public class TouchUserInputTouchUserInputListener : GameEventListener<TouchUserInput, TouchUserInput, TouchUserInputTouchUserInputAction, TouchUserInputTouchUserInputGameEvent, UnityTouchUserInputTouchUserInputEvent> { }
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityTouchUserInputEvent : UnityEvent<TouchUserInput> { }
|
||||
|
||||
[Serializable]
|
||||
public class UnityTouchUserInputTouchUserInputEvent : UnityEvent<TouchUserInput, TouchUserInput> { }
|
||||
}
|
||||
using System;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace UnityAtoms.Mobile
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityTouchUserInputEvent : UnityEvent<TouchUserInput> { }
|
||||
|
||||
[Serializable]
|
||||
public class UnityTouchUserInputTouchUserInputEvent : UnityEvent<TouchUserInput, TouchUserInput> { }
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ namespace UnityAtoms.Mobile
|
||||
if (Input.touchCount > 0)
|
||||
{
|
||||
inputPos = Input.GetTouch(0).position;
|
||||
if (Input.GetTouch(0).phase == TouchPhase.Began)
|
||||
if (Input.GetTouch(0).phase == TouchPhase.Began)
|
||||
{
|
||||
inputPosLastDown = inputPos;
|
||||
inputState = TouchUserInput.State.Down;
|
||||
}
|
||||
else if (Input.GetTouch(0).phase == TouchPhase.Ended)
|
||||
}
|
||||
else if (Input.GetTouch(0).phase == TouchPhase.Ended)
|
||||
{
|
||||
inputState = TouchUserInput.State.Up;
|
||||
}
|
||||
@ -34,7 +34,7 @@ namespace UnityAtoms.Mobile
|
||||
inputState = TouchUserInput.State.Drag;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
inputPos = Vector2.zero;
|
||||
inputState = TouchUserInput.State.None;
|
||||
|
@ -1,33 +1,33 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Molecules/Timer/Timer")]
|
||||
public class Timer : ScriptableObject
|
||||
{
|
||||
public float TimeElapsed = 0f;
|
||||
public bool Started = false;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
Started = true;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
TimeElapsed = 0f;
|
||||
Started = false;
|
||||
}
|
||||
|
||||
public float GetElapsedTime()
|
||||
{
|
||||
return TimeElapsed;
|
||||
}
|
||||
|
||||
public bool IsStarted()
|
||||
{
|
||||
return Started;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Molecules/Timer/Timer")]
|
||||
public class Timer : ScriptableObject
|
||||
{
|
||||
public float TimeElapsed = 0f;
|
||||
public bool Started = false;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
Started = true;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
TimeElapsed = 0f;
|
||||
Started = false;
|
||||
}
|
||||
|
||||
public float GetElapsedTime()
|
||||
{
|
||||
return TimeElapsed;
|
||||
}
|
||||
|
||||
public bool IsStarted()
|
||||
{
|
||||
return Started;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class Collider2DHook : MonoHook<Collider2DEvent, Collider2DGameObjectEvent, Collider2D, GameObjectGameObjectFunction> { }
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ using UnityEngine;
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class ColliderHook : MonoHook<ColliderEvent, ColliderGameObjectEvent, Collider, GameObjectGameObjectFunction> { }
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user