Update 004_Game_Map.rb (#210)

This commit is contained in:
ENLS
2023-06-06 12:44:08 -07:00
committed by GitHub
parent 679e9d42dc
commit 20affb4345

View File

@@ -365,7 +365,7 @@ class Game_Map
# 6: moves 1 tile in 0.05 seconds # 6: moves 1 tile in 0.05 seconds
def start_scroll(direction, distance, speed = 4) def start_scroll(direction, distance, speed = 4)
return if direction <= 0 || direction == 5 || direction >= 10 return if direction <= 0 || direction == 5 || direction >= 10
if [1, 3, 4, 6, 7, 9].include(direction) # horizontal if [1, 3, 4, 6, 7, 9].include?(direction) # horizontal
@scroll_distance_x = distance @scroll_distance_x = distance
@scroll_distance_x *= -1 if [1, 4, 7].include?(direction) @scroll_distance_x *= -1 if [1, 4, 7].include?(direction)
end end