Compare commits

..

9 Commits

Author SHA1 Message Date
d57961f5f1 0.7.0 2023-03-20 22:27:40 +03:00
bca2922a58 0.6.4 2023-02-16 13:54:56 +03:00
76835af6b5 0.6.2 2023-02-16 13:29:25 +03:00
52de02bc1e 0.6.1 2023-02-16 13:19:52 +03:00
cc1e4facbb Merge branch 'development' 2023-02-16 13:08:05 +03:00
1f36b44cfd Merge branch 'development' 2022-12-17 22:44:54 +03:00
a8acea4151 Merge branch 'development' 2022-12-17 15:28:43 +03:00
3ccaea0434 Merge branch 'development' 2022-12-17 14:57:32 +03:00
c0de234086 Merge branch 'development' 2022-12-17 14:43:00 +03:00
4 changed files with 10 additions and 10 deletions

View File

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

View File

@@ -6,7 +6,7 @@ namespace Syntriax.Modules.Trigger
public interface ITrigger
{
/// <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>
IStateEnable StateEnable { get; }

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "com.syntriax.trigger",
"version": "0.3.0",
"version": "0.7.0",
"displayName": "Trigger Module",
"unity": "2019.1",
"documentationUrl": "https://git.syntriax.com/Syntriax/Trigger.git",