public EntityInfo GetEntityInfo(Entity target) { return new EntityInfo { Name = target.GetName(), Position = target.Body.Position, Rotation = target.Body.Rotation, Size = target.Size, Speed = target.GetSpeed(), AverageColor = target.CurrentSprite.AverageColor }; }
private void Spawn(Entity entity) { EntityList.Add(entity); if (entity.GetName() != "creature") return; var creatures = EntityList.FindAll(p => p.GetName() == "creature"); MaxGeneration = creatures.Max(s => (int)s.GetCustomData()["generation"]); }