| | 1 | | using UnityEngine; |
| | 2 | | using System.Collections.Generic; |
| | 3 | |
|
| | 4 | | public class Vessel : MonoBehaviour { |
| | 5 | | [SerializeField] |
| 0 | 6 | | private List<Interceptor> missileInventory = new List<Interceptor>(); |
| | 7 | |
|
| 0 | 8 | | public void AddInterceptor(Interceptor interceptor) { |
| 0 | 9 | | if (interceptor != null) { |
| 0 | 10 | | missileInventory.Add(interceptor); |
| 0 | 11 | | } |
| 0 | 12 | | } |
| | 13 | |
|
| 0 | 14 | | public void RemoveInterceptor(Interceptor interceptor) { |
| 0 | 15 | | missileInventory.Remove(interceptor); |
| 0 | 16 | | } |
| | 17 | |
|
| 0 | 18 | | public List<Interceptor> GetInterceptorInventory() { |
| 0 | 19 | | return new List<Interceptor>(missileInventory); |
| 0 | 20 | | } |
| | 21 | |
|
| 0 | 22 | | public int GetInterceptorCount() { |
| 0 | 23 | | return missileInventory.Count; |
| 0 | 24 | | } |
| | 25 | |
|
| | 26 | | // Additional methods can be added here as needed |
| | 27 | | } |