diff options
| author | Sarah Bradley <git@sarahduck.ca> | 2023-12-17 23:31:40 -0800 |
|---|---|---|
| committer | Sarah Bradley <git@sarahduck.ca> | 2023-12-17 23:31:40 -0800 |
| commit | fc3874657348bde6ce7e3fab625c92dfec91baaa (patch) | |
| tree | 63ddf1864d5c2fb82be156621c6a7225819ef233 /Drawable.cs | |
| parent | 217c93639fc6dee3222e0a3724dd5ed67b34f412 (diff) | |
Added Window Scaling, custom mouse, and Neko nametags
Diffstat (limited to 'Drawable.cs')
| -rw-r--r-- | Drawable.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Drawable.cs b/Drawable.cs index 0f89de9..0f74a1c 100644 --- a/Drawable.cs +++ b/Drawable.cs @@ -5,6 +5,8 @@ namespace OnekoOnline; abstract class Drawable : IDisposable { + protected int DrawOrder = 0; + public Vector2 Position { get => _position; set => _position = value.Round(); @@ -19,7 +21,7 @@ abstract class Drawable : IDisposable public static void DrawAll() { float delta = Raylib.GetFrameTime(); - foreach (Drawable drawable in Drawables.OrderBy(d => d.Position.Y)) { + foreach (Drawable drawable in Drawables.OrderBy(d => d.Position.Y + d.DrawOrder*1000)) { drawable?.Update(delta); drawable?.Draw(); } |
