Add debug teleportation and player position display; enhance maze debug output
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
class Character
|
||||
attr_reader :world_x, :world_y
|
||||
|
||||
SPEED = 2.5
|
||||
SIZE = [25, 30]
|
||||
|
||||
@@ -89,6 +91,14 @@ class Character
|
||||
@world_y -= dy
|
||||
end
|
||||
|
||||
# teleport to boss room for debug purposes
|
||||
if DEBUG && Gosu.button_down?(Gosu::KB_T)
|
||||
room_coords = $bus.get(:boss_room_coords)
|
||||
if room_coords
|
||||
@world_x, @world_y = [room_coords[0] * 60 + 5, room_coords[1] * 60 + 5]
|
||||
end
|
||||
end
|
||||
|
||||
# Camera follow
|
||||
cam_x = @world_x - SCREEN_SIZE[0] / 2.0
|
||||
cam_y = @world_y - SCREEN_SIZE[1] / 2.0
|
||||
|
||||
Reference in New Issue
Block a user