Files
project-reset/Assets/Scripts/Core/GenericLockOnTarget.cs

19 lines
489 B
C#

using System;
using UnityEngine;
namespace Reset.Units{
public class GenericLockOnTarget : MonoBehaviour, ILockOnTarget{
public float lockonTargetRadius{ get; set; } = 1f;
public bool lockonDebug{ get; set; } = false;
public float lockonRaycastVerticalOffset{ get; set; }
public void OnTargetDelete(){
GetComponent<ILockOnTarget>().SafelyDeleteTarget();
}
void OnDestroy(){
OnTargetDelete();
}
}
}