Exemplo n.º 1
0
 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
     };
 }
Exemplo n.º 2
0
        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"]);
        }