Refactor character and enemy AI movement logic; implement delta time for smoother updates and replace object (a reserved keyword) with prop.

This commit is contained in:
2026-03-28 16:43:37 +00:00
parent 95f2be311d
commit e42b31ec24
13 changed files with 219 additions and 205 deletions
+6 -1
View File
@@ -17,6 +17,7 @@ class Window < Gosu::Window
self.caption = "Mist"
@scene = Menu.new
@last_time = Gosu.milliseconds
$bus.on(:quit_game) { close! }
@@ -35,7 +36,11 @@ class Window < Gosu::Window
end
def update
@scene.update
now = Gosu.milliseconds
dt = (now - @last_time) / 1000.0
@last_time = now
@scene.update(dt)
end
def compute_transform