17 lines
420 B
C#
17 lines
420 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
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();
|
|
}
|
|
}
|