2024-09-12 20:06:47 -07:00
|
|
|
using UnityEngine;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
// Integrated Air Defense System
|
2024-09-13 22:45:25 -07:00
|
|
|
public class IADS : MonoBehaviour {
|
|
|
|
public enum TargetStatus { UNASSIGNED, ASSIGNED, HIT, DEGRADED, DESTROYED }
|
|
|
|
|
2024-09-24 19:24:50 -07:00
|
|
|
// Look up threat status by unique threat ID
|
2024-09-13 22:45:25 -07:00
|
|
|
public Dictionary<string, TargetStatus> _targetStatusDictionary;
|
|
|
|
|
2024-09-24 19:24:50 -07:00
|
|
|
private List<Threat> _threats;
|
2024-09-13 22:45:25 -07:00
|
|
|
|
2024-09-24 19:59:25 -07:00
|
|
|
private List<Interceptor> _interceptors;
|
2024-09-13 22:45:25 -07:00
|
|
|
|
|
|
|
private List<Vessel> _vessels;
|
|
|
|
|
2024-09-24 19:59:25 -07:00
|
|
|
public delegate void RegisterNewThreatDelegate(Threat threat);
|
|
|
|
public event RegisterNewThreatDelegate OnRegisterNewThreat;
|
2024-09-13 22:45:25 -07:00
|
|
|
|
|
|
|
void Start() {
|
2024-09-24 19:24:50 -07:00
|
|
|
_threats = new List<Threat>();
|
2024-09-13 22:45:25 -07:00
|
|
|
}
|
|
|
|
|
2024-09-24 19:59:25 -07:00
|
|
|
public void RegisterNewThreat(Threat threat) {
|
2024-09-24 19:24:50 -07:00
|
|
|
_threats.Add(threat);
|
2024-09-24 19:59:25 -07:00
|
|
|
OnRegisterNewThreat?.Invoke(threat);
|
2024-09-13 22:45:25 -07:00
|
|
|
}
|
2024-09-12 20:06:47 -07:00
|
|
|
}
|