15 lines
316 B
C#
15 lines
316 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class GenericLockOnTarget : MonoBehaviour, ILockOnTarget{
|
|
public float lockonTargetRadius{ get; set; } = 1f;
|
|
|
|
public void OnTargetDelete(){
|
|
GetComponent<ILockOnTarget>().SafelyDeleteTarget();
|
|
}
|
|
|
|
void OnDestroy(){
|
|
OnTargetDelete();
|
|
}
|
|
}
|