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:
Jeff Campbell 2019-04-07 11:10:09 +02:00
parent e5f6659eda
commit 7763f81ede
154 changed files with 302 additions and 302 deletions

View File

@ -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;
}
}
}
}

View File

@ -9,4 +9,4 @@ namespace UnityAtoms
{
void OnEventRaised(T1 first, T2 second);
}
}
}

View File

@ -26,4 +26,4 @@ namespace UnityAtoms
{
public abstract void Do(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5);
}
}
}

View File

@ -24,4 +24,4 @@ namespace UnityAtoms
return reference.Value;
}
}
}
}

View File

@ -9,4 +9,4 @@ namespace UnityAtoms
return (t1 == null && t2 == null) || (t1 != null && t1.Equals(t2));
}
}
}
}

View File

@ -7,4 +7,4 @@ namespace UnityAtoms
bool ApplyChange(T amount);
bool ApplyChange(EquatableScriptableObjectVariable<T, E1, E2> amount);
}
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
T OldValue { get; }
}
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
T Value { get; set; }
}
}
}

View File

@ -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); }
}
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class BoolAction : GameAction<bool> { }
}
}

View File

@ -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> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Constant", fileName = "BoolConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
public class BoolConstant : ScriptableObjectVariableBase<bool> { }
}
}

View File

@ -5,4 +5,4 @@ namespace UnityAtoms
[CreateAssetMenu(menuName = "Unity Atoms/Bool/Event", fileName = "BoolEvent", order = CreateAssetMenuUtils.Order.EVENT)]
public class BoolEvent : GameEvent<bool> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Bool/List", fileName = "BoolList", order = CreateAssetMenuUtils.Order.LIST)]
public class BoolList : ScriptableObjectList<bool, BoolEvent> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[Serializable]
public class BoolReference : ScriptableObjectReference<bool, BoolVariable, BoolEvent, BoolBoolEvent> { }
}
}

View File

@ -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> { }
}
}

View File

@ -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> { }
}

View File

@ -5,4 +5,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityBoolEvent : UnityEvent<bool> { }
}
}

View File

@ -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> { }
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class ColliderGameObjectAction : GameAction<Collider, GameObject> { }
}
}

View File

@ -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> { }
}
}

View File

@ -6,4 +6,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityColliderGameObjectEvent : UnityEvent<Collider, GameObject> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class Collider2DAction : GameAction<Collider2D> { }
}
}

View File

@ -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> { }
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class Collider2DEventAction : GameAction<Collider2DEvent> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class Collider2DGameObjectAction : GameAction<Collider2D, GameObject> { }
}
}

View File

@ -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> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Collider2D/List", fileName = "Collider2DList", order = CreateAssetMenuUtils.Order.LIST)]
public class Collider2DList : ScriptableObjectList<Collider2D, Collider2DEvent> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class Collider2DListAction : GameAction<Collider2DList> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class Collider2DListGameObjectAction : GameAction<Collider2DList, GameObject> { }
}
}

View File

@ -11,4 +11,4 @@ namespace UnityAtoms
Collider2DHook
>
{ }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public class CreateCollider2DListOnAwake : CreateListOnAwake<Collider2D, Collider2DList, Collider2DEvent, Collider2DListener, Collider2DAction, Collider2DListAction, Collider2DListGameObjectAction, UnityCollider2DEvent> { }
}
}

View File

@ -6,4 +6,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityCollider2DEvent : UnityEvent<Collider2D> { }
}
}

View File

@ -6,4 +6,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityCollider2DGameObjectEvent : UnityEvent<Collider2D, GameObject> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class ColorAction : GameAction<Color> { }
}
}

View File

@ -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> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Color/Constant", fileName = "ColorConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
public class ColorConstant : ScriptableObjectVariableBase<Color> { }
}
}

View File

@ -5,4 +5,4 @@ namespace UnityAtoms
[CreateAssetMenu(menuName = "Unity Atoms/Color/Event", fileName = "ColorEvent", order = CreateAssetMenuUtils.Order.EVENT)]
public class ColorEvent : GameEvent<Color> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Color/List", fileName = "ColorList", order = CreateAssetMenuUtils.Order.LIST)]
public class ColorList : ScriptableObjectList<Color, ColorEvent> { }
}
}

View File

@ -5,4 +5,4 @@ namespace UnityAtoms
{
[Serializable]
public class ColorReference : ScriptableObjectReference<Color, ColorVariable, ColorEvent, ColorColorEvent> { }
}
}

View File

@ -10,4 +10,4 @@ namespace UnityAtoms
return first.Equals(second);
}
}
}
}

View File

@ -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> { }
}
}

View File

@ -6,4 +6,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityColorEvent : UnityEvent<Color> { }
}
}

View File

@ -45,4 +45,4 @@ namespace UnityAtoms
[CustomEditor(typeof(VoidEvent))]
public class VoidEventEditor : GameEventEditor<Void, VoidEvent> { }
}
}

View File

@ -74,4 +74,4 @@ namespace UnityAtoms
[CustomPropertyDrawer(typeof(Vector3Reference))]
public class Vector3ReferenceDrawer : ReferenceDrawer { }
}
}
}

View File

@ -14,4 +14,4 @@ namespace UnityAtoms.Extensions
return array[Random.Range(0, array.Length)];
}
}
}
}

View File

@ -14,4 +14,4 @@ namespace UnityAtoms.Extensions
return camera.GetOrthographicWorldScreenHeight() / Screen.height * Screen.width; ;
}
}
}
}

View File

@ -42,4 +42,4 @@ namespace UnityAtoms.Extensions
return mb.gameObject.GetOrAddComponent<T>();
}
}
}
}

View File

@ -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)
{

View File

@ -20,4 +20,4 @@ namespace UnityAtoms.Extensions
return v2 + (distance.normalized * maxDistance);
}
}
}
}

View File

@ -25,4 +25,4 @@ namespace UnityAtoms.Extensions
);
}
}
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class FloatAction : GameAction<float> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Float/Constant", fileName = "FloatConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
public class FloatConstant : ScriptableObjectVariableBase<float> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Float/Event", fileName = "FloatEvent", order = CreateAssetMenuUtils.Order.EVENT)]
public class FloatEvent : GameEvent<float> { }
}
}

View File

@ -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> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Float/List", fileName = "FloatList", order = CreateAssetMenuUtils.Order.LIST)]
public class FloatList : ScriptableObjectList<float, FloatEvent> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[Serializable]
public class FloatReference : ScriptableObjectReference<float, FloatVariable, FloatEvent, FloatFloatEvent> { }
}
}

View File

@ -15,4 +15,4 @@ namespace UnityAtoms
return SetValue(Value + amount.Value);
}
}
}
}

View File

@ -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> { }
}
}

View File

@ -5,4 +5,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityFloatEvent : UnityEvent<float> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class BoolBoolFunction : GameFunction<bool, bool> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class BoolColorFunction : GameFunction<bool, Color> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class BoolFloatFunction : GameFunction<bool, float> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class BoolFunction : GameFunction<bool> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class BoolGameObjectFunction : GameFunction<bool, GameObject> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class BoolIntFunction : GameFunction<bool, int> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class BoolVector2Function : GameFunction<bool, Vector2> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class BoolVector3Function : GameFunction<bool, Vector3> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class BoolVoidFunction : GameFunction<bool, Void> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class GameObjectFunction : GameFunction<GameObject> { }
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class GameObjectGameObjectFunction : GameFunction<GameObject, GameObject> { }
}
}

View File

@ -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> { }
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class IntFunction : GameFunction<int> { }
}
namespace UnityAtoms
{
public abstract class IntFunction : GameFunction<int> { }
}

View File

@ -31,4 +31,4 @@ namespace UnityAtoms
{
public abstract R Call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5);
}
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class GameObjectAction : GameAction<GameObject> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/GameObject/Event", fileName = "GameObjectEvent", order = CreateAssetMenuUtils.Order.EVENT)]
public class GameObjectEvent : GameEvent<GameObject> { }
}
}

View File

@ -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> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/GameObject/List", fileName = "GameObjectList", order = CreateAssetMenuUtils.Order.LIST)]
public class GameObjectList : ScriptableObjectList<GameObject, GameObjectEvent> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class GameObjectListAction : GameAction<GameObjectList> { }
}
}

View File

@ -5,4 +5,4 @@ namespace UnityAtoms
{
[Serializable]
public class GameObjectReference : ScriptableObjectReference<GameObject, GameObjectVariable, GameObjectEvent, GameObjectGameObjectEvent> { }
}
}

View File

@ -10,4 +10,4 @@ namespace UnityAtoms
return (first == null && second == null) || first != null && second != null && first.GetInstanceID() == second.GetInstanceID();
}
}
}
}

View File

@ -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> { }
}
}

View File

@ -6,4 +6,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityGameObjectEvent : UnityEvent<GameObject> { }
}
}

View File

@ -1,4 +1,4 @@
namespace UnityAtoms
{
public abstract class IntAction : GameAction<int> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Int/Constant", fileName = "IntConstant", order = CreateAssetMenuUtils.Order.CONSTANT)]
public class IntConstant : ScriptableObjectVariableBase<int> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Int/Event", fileName = "IntEvent", order = CreateAssetMenuUtils.Order.EVENT)]
public class IntEvent : GameEvent<int> { }
}
}

View File

@ -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> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Int/List", fileName = "IntList", order = CreateAssetMenuUtils.Order.LIST)]
public class IntList : ScriptableObjectList<int, IntEvent> { }
}
}

View File

@ -4,4 +4,4 @@ namespace UnityAtoms
{
[Serializable]
public class IntReference : ScriptableObjectReference<int, IntVariable, IntEvent, IntIntEvent> { }
}
}

View File

@ -15,4 +15,4 @@ namespace UnityAtoms
return SetValue(Value + amount.Value);
}
}
}
}

View File

@ -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> { }
}
}

View File

@ -5,4 +5,4 @@ namespace UnityAtoms
{
[Serializable]
public class UnityIntEvent : UnityEvent<int> { }
}
}

View File

@ -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> { }
}

View File

@ -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> { }
}

View File

@ -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> { }
}

View File

@ -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> { }
}

View File

@ -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;

View File

@ -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;
}
}
}

View File

@ -3,4 +3,4 @@ using UnityEngine;
namespace UnityAtoms
{
public abstract class Collider2DHook : MonoHook<Collider2DEvent, Collider2DGameObjectEvent, Collider2D, GameObjectGameObjectFunction> { }
}
}

View File

@ -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