diff --git a/Assets/Scripts/Units/Combat/UnitComponent.cs b/Assets/Scripts/Units/Combat/UnitComponent.cs index 6a1d871..66c110e 100644 --- a/Assets/Scripts/Units/Combat/UnitComponent.cs +++ b/Assets/Scripts/Units/Combat/UnitComponent.cs @@ -5,18 +5,20 @@ namespace Reset.Units{ private bool enabledAsHost = true; private Unit _unit; - internal Unit Unit{ get { - if (_unit != null) { - return _unit; - } - - _unit = GetComponent(); - + if (_unit == null) { _unit = GetComponent(); } return _unit; } } + + private UnitMovementHandler _movement; + internal UnitMovementHandler Movement{ + get { + if (_movement == null) { _movement = GetComponent(); } + return _movement; + } + } void DisableComponent(){ enabledAsHost = false;