diff --git a/Assets/Scripts/Tower/Tower.cs b/Assets/Scripts/Tower/Tower.cs index e7386f5..d6d582b 100644 --- a/Assets/Scripts/Tower/Tower.cs +++ b/Assets/Scripts/Tower/Tower.cs @@ -11,6 +11,8 @@ public abstract class Tower : MonoBehaviour protected HealthComponent healthComp; protected Outline outline; + protected Camera mainCam; + // Getters public virtual void TowerSelected(bool selected) { @@ -26,6 +28,8 @@ public abstract class Tower : MonoBehaviour outline = GetComponent(); Assert.IsNotNull(healthComp); Assert.IsNotNull(outline); + + mainCam = Camera.main; } protected virtual void Start() @@ -38,6 +42,7 @@ public abstract class Tower : MonoBehaviour protected virtual void Update() { + selectedUI.transform.LookAt(mainCam.transform.position); } protected virtual void FixedUpdate()