1.Commit
This commit is contained in:
40
Assets/Scripts/FleetManager.cs
Normal file
40
Assets/Scripts/FleetManager.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user