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
+2 -2
View File
@@ -5,9 +5,9 @@ class EnemyHandler
@enemies = []
end
def update
def update(dt)
spawn!
@enemies.each(&:update)
@enemies.each { |enemy| enemy.update(dt) }
end
def spawn!