Game Loop

Player spawns in starter ship, is presented with a game over screen when they die, with the option to start over
This commit is contained in:
Reinier Vens 2021-03-09 02:26:58 +00:00
commit f340e992ec
14 changed files with 340 additions and 159 deletions

View file

@ -31,6 +31,7 @@ public class Zone
private float _time;
private Random _random;
public List<Agent> Agents = new List<Agent>();
public ZoneData Data { get; }
private List<Task> BeltUpdates = new List<Task>();
@ -107,6 +108,9 @@ public class Zone
BeltUpdates.Add(Task.Run(() => UpdateAsteroidTransformsAsync(belt.Key)));
}
foreach(var agent in Agents)
agent.Update(deltaTime);
foreach (var entity in Entities) entity.Update(deltaTime);
}