Squashed commit of the following:
commit173bbb165cAuthor: henjkey <henjkey@gmail.com> Date: Fri Aug 14 18:51:23 2026 +0500 Mappp commitd559ab338aAuthor: henjkey <henjkey@gmail.com> Date: Thu Aug 13 18:42:41 2026 +0500 Map Controller Coordinates Target System Crosshair System Radar System
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "TargetConfig", menuName = "Map Radar/Target Config")]
|
||||
public sealed class TargetConfig : ScriptableObject
|
||||
{
|
||||
[Header("Target Prefab")]
|
||||
[SerializeField] private MapTarget targetPrefab = null;
|
||||
|
||||
[Header("Target Stats")]
|
||||
[SerializeField, Min(0f)] private float timeBeforeAttack = 5f;
|
||||
[SerializeField, Min(1)] private int health = 100;
|
||||
[SerializeField] private MissileType requiredMissileType = MissileType.Standard;
|
||||
|
||||
[Header("Air Target Movement")]
|
||||
[SerializeField, Min(0f)] private float movementSpeed = 1f;
|
||||
[SerializeField, Min(0f)] private float stoppingDistance = 0.25f;
|
||||
|
||||
public MapTarget TargetPrefab => targetPrefab;
|
||||
public float TimeBeforeAttack => timeBeforeAttack;
|
||||
public int Health => health;
|
||||
public MissileType RequiredMissileType => requiredMissileType;
|
||||
public float MovementSpeed => movementSpeed;
|
||||
public float StoppingDistance => stoppingDistance;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
timeBeforeAttack = Mathf.Max(0f, timeBeforeAttack);
|
||||
health = Mathf.Max(1, health);
|
||||
movementSpeed = Mathf.Max(0f, movementSpeed);
|
||||
stoppingDistance = Mathf.Max(0f, stoppingDistance);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user