Code tidying with Rubocop

This commit is contained in:
Maruno17
2023-07-18 22:42:10 +01:00
parent 6053363715
commit a5734eaf46
68 changed files with 276 additions and 232 deletions

View File

@@ -448,13 +448,13 @@ class Game_Map
if (@scroll_distance_x || 0) != 0
duration = @scroll_distance_x.abs * TILE_WIDTH.to_f / (10 * (2**@scroll_speed))
scroll_offset = lerp(0, @scroll_distance_x, duration, @scroll_timer_start, uptime_now)
self.display_x = @scroll_start_x + scroll_offset * REAL_RES_X
self.display_x = @scroll_start_x + (scroll_offset * REAL_RES_X)
@scroll_distance_x = 0 if scroll_offset == @scroll_distance_x
end
if (@scroll_distance_y || 0) != 0
duration = @scroll_distance_y.abs * TILE_HEIGHT.to_f / (10 * (2**@scroll_speed))
scroll_offset = lerp(0, @scroll_distance_y, duration, @scroll_timer_start, uptime_now)
self.display_y = @scroll_start_y + scroll_offset * REAL_RES_Y
self.display_y = @scroll_start_y + (scroll_offset * REAL_RES_Y)
@scroll_distance_y = 0 if scroll_offset == @scroll_distance_y
end
# Only update events that are on-screen