diff --git a/src/Core/Entity.bf b/src/Core/Entity.bf index 8198877..150f316 100644 --- a/src/Core/Entity.bf +++ b/src/Core/Entity.bf @@ -6,7 +6,7 @@ namespace Strawberry public abstract class Entity { public Scene Scene { get; private set; } - public int Depth; + public int Priority; public bool Active = true; public bool Visible = true; public bool Collidable = true; @@ -428,7 +428,7 @@ namespace Strawberry static public int Compare(Entity a, Entity b) { - return a.Depth <=> b.Depth; + return a.Priority <=> b.Priority; } } } diff --git a/src/Core/Scene.bf b/src/Core/Scene.bf index 181332a..83732fd 100644 --- a/src/Core/Scene.bf +++ b/src/Core/Scene.bf @@ -186,14 +186,14 @@ namespace Strawberry public T First() where T : Entity { - for (var e in entityTracker[typeof(T)]) + for (let e in entityTracker[typeof(T)]) return e as T; return null; } public T First(Point point) where T : Entity { - for (var e in entityTracker[typeof(T)]) + for (let e in entityTracker[typeof(T)]) if (e.Check(point)) return e as T; return null; @@ -201,7 +201,7 @@ namespace Strawberry public T First(Rect rect) where T : Entity { - for (var e in entityTracker[typeof(T)]) + for (let e in entityTracker[typeof(T)]) if (e.Check(rect)) return e as T; return null; @@ -209,14 +209,14 @@ namespace Strawberry public List All(List into) where T : Entity { - for (var e in entityTracker[typeof(T)]) + for (let e in entityTracker[typeof(T)]) into.Add(e as T); return into; } public List All(Point point, List into) where T : Entity { - for (var e in entityTracker[typeof(T)]) + for (let e in entityTracker[typeof(T)]) if (e.Check(point)) into.Add(e as T); return into; @@ -224,7 +224,7 @@ namespace Strawberry public List All(Rect rect, List into) where T : Entity { - for (var e in entityTracker[typeof(T)]) + for (let e in entityTracker[typeof(T)]) if (e.Check(rect)) into.Add(e as T); return into;