Compare commits

..

No commits in common. "d15c05d53f2ac5c7ee76571ee038c9cbafd26e68" and "34c3a3bc8e9ed4297346770e1dc852a9908c673a" have entirely different histories.

4 changed files with 11 additions and 11 deletions

View File

@ -47,13 +47,13 @@ namespace Syntriax.Modules.Trigger
} }
#if UNITY_EDITOR #if UNITY_EDITOR
private State.IStateEnable _stateEnable = null; private State.IStateEnable stateEnable = null;
public State.IStateEnable StateEnable public State.IStateEnable StateEnable
{ {
get get
{ {
_stateEnable = _stateEnable ?? GetComponent<State.IStateEnable>() ?? gameObject.AddComponent<State.StateEnableMonoBehaviour>(); stateEnable = stateEnable ?? GetComponent<State.IStateEnable>() ?? gameObject.AddComponent<State.StateEnableMonoBehaviour>();
return _stateEnable; return stateEnable;
} }
} }
#endif #endif

View File

@ -6,7 +6,7 @@ namespace Syntriax.Modules.Trigger
public interface ITrigger public interface ITrigger
{ {
/// <summary> /// <summary>
/// <see cref="IStateEnable"/> to control the state of the <see cref="ITrigger"/> is on or off /// <see cref="IStateEnable"/> to switch on or off
/// </summary> /// </summary>
IStateEnable StateEnable { get; } IStateEnable StateEnable { get; }

View File

@ -8,17 +8,17 @@ namespace Syntriax.Modules.Trigger
{ {
public Action<bool> OnTriggerStateChanged { get; set; } = null; public Action<bool> OnTriggerStateChanged { get; set; } = null;
private IStateEnable _stateEnable = null; private IStateEnable stateEnable = null;
public IStateEnable StateEnable public IStateEnable StateEnable
{ {
get get
{ {
if (_stateEnable == null) if (stateEnable == null)
{ {
_stateEnable = GetComponent<IStateEnable>() ?? gameObject.AddComponent<StateEnableMonoBehaviour>(); stateEnable = GetComponent<IStateEnable>() ?? gameObject.AddComponent<StateEnableMonoBehaviour>();
_stateEnable.OnEnabledChanged += OnEnabledChanged; stateEnable.OnEnabledChanged += OnEnabledChanged;
} }
return _stateEnable; return stateEnable;
} }
} }

View File

@ -1,11 +1,11 @@
{ {
"name": "com.syntriax.trigger", "name": "com.syntriax.trigger",
"version": "0.7.1", "version": "0.7.0",
"displayName": "Trigger Module", "displayName": "Trigger Module",
"unity": "2019.1", "unity": "2019.1",
"documentationUrl": "https://git.syntriax.com/Syntriax/Trigger.git", "documentationUrl": "https://git.syntriax.com/Syntriax/Trigger.git",
"dependencies": { "dependencies": {
"com.syntriax.state": "0.2.0" "com.syntriax.state": "0.1.0"
}, },
"keywords": ["Trigger"], "keywords": ["Trigger"],
"author": { "author": {