2024-09-12 20:06:47 -07:00
|
|
|
using UnityEngine;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2024-09-13 22:45:25 -07:00
|
|
|
public class Vessel : MonoBehaviour {
|
|
|
|
[SerializeField]
|
2024-09-24 19:59:25 -07:00
|
|
|
private List<Interceptor> missileInventory = new List<Interceptor>();
|
2024-09-12 20:06:47 -07:00
|
|
|
|
2024-09-24 19:59:25 -07:00
|
|
|
public void AddInterceptor(Interceptor interceptor) {
|
|
|
|
if (interceptor != null) {
|
|
|
|
missileInventory.Add(interceptor);
|
2024-09-12 20:06:47 -07:00
|
|
|
}
|
2024-09-13 22:45:25 -07:00
|
|
|
}
|
2024-09-12 20:06:47 -07:00
|
|
|
|
2024-09-24 19:59:25 -07:00
|
|
|
public void RemoveInterceptor(Interceptor interceptor) {
|
|
|
|
missileInventory.Remove(interceptor);
|
2024-09-13 22:45:25 -07:00
|
|
|
}
|
2024-09-12 20:06:47 -07:00
|
|
|
|
2024-09-24 19:59:25 -07:00
|
|
|
public List<Interceptor> GetInterceptorInventory() {
|
|
|
|
return new List<Interceptor>(missileInventory);
|
2024-09-13 22:45:25 -07:00
|
|
|
}
|
2024-09-12 20:06:47 -07:00
|
|
|
|
2024-09-24 19:59:25 -07:00
|
|
|
public int GetInterceptorCount() {
|
2024-09-13 22:45:25 -07:00
|
|
|
return missileInventory.Count;
|
|
|
|
}
|
2024-09-12 20:06:47 -07:00
|
|
|
|
2024-09-13 22:45:25 -07:00
|
|
|
// Additional methods can be added here as needed
|
2024-09-12 20:06:47 -07:00
|
|
|
}
|