Game Context was creating an empty OrbitalEntity for every planet; this was an ugly hack so I refactored it, as well as refactoring some object references to GUIDs as they should be
24 lines
511 B
C#
24 lines
511 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
public class EntityAgent
|
|
{
|
|
public AgentBehavior CurrentBehavior;
|
|
|
|
public Entity Entity { get; }
|
|
public GameContext Context { get; }
|
|
public Guid Zone { get; set; }
|
|
|
|
public EntityAgent(GameContext context, Guid zone, Entity entity)
|
|
{
|
|
Entity = entity;
|
|
Zone = zone;
|
|
Context = context;
|
|
}
|
|
|
|
public void Update(float delta)
|
|
{
|
|
CurrentBehavior.Update(delta);
|
|
}
|
|
}
|