improv: added IUnitDirectionProvider.cs interface to replace directly accessing LockOnManager as part of generification of UnitMovementHandler.cs

This commit is contained in:
Chris
2025-10-23 21:44:31 -04:00
parent 0cb88b8fc6
commit 392f24a916
3 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
using UnityEngine;
namespace Reset.Units{
public interface IUnitTargetProvider{
public GameObject UnitTarget{ get; }
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f0c49825086c41e0990e5fa5d3f0041c
timeCreated: 1761269267

View File

@@ -24,6 +24,9 @@ namespace Reset.Units{
} }
public static LockOnManager Instance; public static LockOnManager Instance;
// IUnitTargetProvider
public GameObject UnitTarget => mainTarget.gameObject;
// Lock On settings // Lock On settings
[Space(5)] public float lockOnRange = 40f; [Space(5)] public float lockOnRange = 40f;
@@ -310,5 +313,4 @@ namespace Reset.Units{
} }
} }
} }
} }