refactor: Back Fields Are Renamed
This commit is contained in:
parent
c8105122fb
commit
fc49961ef3
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue