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

@@ -166,7 +166,8 @@ class PokemonEggHatch_Scene
@sprites["hatch"].x = @sprites["pokemon"].x
end
def updateScene(duration = 0.01) # Can be used for "wait" effect
# Can be used for "wait" effect.
def updateScene(duration = 0.01)
timer_start = System.uptime
while System.uptime - timer_start < duration
Graphics.update

View File

@@ -202,8 +202,8 @@ class HallOfFame_Scene
distance = (y_direction > 0) ? end_y : Graphics.height - end_y
distance += @sprites["pokemon#{i}"].bitmap.height / 2
end
start_x = end_x - x_direction * distance
start_y = end_y - y_direction * distance
start_x = end_x - (x_direction * distance)
start_y = end_y - (y_direction * distance)
@sprites["pokemon#{i}"].x = start_x
@sprites["pokemon#{i}"].y = start_y
@movements[i] = [start_x, end_x, start_y, end_y]

View File

@@ -227,7 +227,7 @@ class Scene_Credits
end
return if cancel?
return if last?
@realOY = SCROLL_SPEED * (System.uptime - @timer_start) - Graphics.height + @trim
@realOY = (SCROLL_SPEED * (System.uptime - @timer_start)) - Graphics.height + @trim
@credit_sprites.each_with_index { |s, i| s.oy = @realOY - (@bitmap_height * i) }
end
end