41 lines
793 B
C#
41 lines
793 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class FleetManager : MonoBehaviour
|
|
{
|
|
|
|
public static int maxSpeed = 10000;
|
|
public List<Fleet> Fleets = new();
|
|
public Fleet selectedFleet;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
}
|
|
|
|
public void UpdateFleetsList()
|
|
{
|
|
for (int i = 0; i < Fleets.Count; i++)
|
|
{
|
|
if (Fleets[i] ==null || !Fleets[i].isActiveAndEnabled)
|
|
{
|
|
Fleets.Remove(Fleets[i]);
|
|
}
|
|
}
|
|
}
|
|
public void UpdateTravelTime()
|
|
{
|
|
foreach (Fleet g in Fleets)
|
|
{
|
|
g.Travel();
|
|
}
|
|
}
|
|
|
|
}
|