mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Added decent spacing to all scripts thanks to Rubocop
This commit is contained in:
@@ -90,39 +90,39 @@ class Game_Screen
|
||||
# * Frame Update
|
||||
#-----------------------------------------------------------------------------
|
||||
def update
|
||||
if @fadeout_duration && @fadeout_duration>=1
|
||||
if @fadeout_duration && @fadeout_duration >= 1
|
||||
d = @fadeout_duration
|
||||
@brightness = (@brightness*(d-1))/d
|
||||
@brightness = (@brightness * (d - 1)) / d
|
||||
@fadeout_duration -= 1
|
||||
end
|
||||
if @fadein_duration && @fadein_duration>=1
|
||||
if @fadein_duration && @fadein_duration >= 1
|
||||
d = @fadein_duration
|
||||
@brightness = (@brightness*(d-1)+255)/d
|
||||
@brightness = (@brightness * (d - 1) + 255) / d
|
||||
@fadein_duration -= 1
|
||||
end
|
||||
if @tone_duration>=1
|
||||
if @tone_duration >= 1
|
||||
d = @tone_duration
|
||||
@tone.red = (@tone.red*(d-1)+@tone_target.red)/d
|
||||
@tone.green = (@tone.green*(d-1)+@tone_target.green)/d
|
||||
@tone.blue = (@tone.blue*(d-1)+@tone_target.blue)/d
|
||||
@tone.gray = (@tone.gray*(d-1)+@tone_target.gray)/d
|
||||
@tone.red = (@tone.red * (d - 1) + @tone_target.red) / d
|
||||
@tone.green = (@tone.green * (d - 1) + @tone_target.green) / d
|
||||
@tone.blue = (@tone.blue * (d - 1) + @tone_target.blue) / d
|
||||
@tone.gray = (@tone.gray * (d - 1) + @tone_target.gray) / d
|
||||
@tone_duration -= 1
|
||||
end
|
||||
if @flash_duration>=1
|
||||
if @flash_duration >= 1
|
||||
d = @flash_duration
|
||||
@flash_color.alpha = @flash_color.alpha*(d-1)/d
|
||||
@flash_color.alpha = @flash_color.alpha * (d - 1) / d
|
||||
@flash_duration -= 1
|
||||
end
|
||||
if @shake_duration>=1 || @shake!=0
|
||||
delta = (@shake_power*@shake_speed*@shake_direction)/10.0
|
||||
if @shake_duration<=1 && @shake*(@shake+delta)<0
|
||||
if @shake_duration >= 1 || @shake != 0
|
||||
delta = (@shake_power * @shake_speed * @shake_direction) / 10.0
|
||||
if @shake_duration <= 1 && @shake * (@shake + delta) < 0
|
||||
@shake = 0
|
||||
else
|
||||
@shake += delta
|
||||
end
|
||||
@shake_direction = -1 if @shake>@shake_power*2
|
||||
@shake_direction = 1 if @shake<-@shake_power*2
|
||||
@shake_duration -= 1 if @shake_duration>=1
|
||||
@shake_direction = -1 if @shake > @shake_power * 2
|
||||
@shake_direction = 1 if @shake < -@shake_power * 2
|
||||
@shake_duration -= 1 if @shake_duration >= 1
|
||||
end
|
||||
if $game_temp.in_battle
|
||||
for i in 51..100
|
||||
@@ -139,17 +139,17 @@ end
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbToneChangeAll(tone,duration)
|
||||
$game_screen.start_tone_change(tone,duration*Graphics.frame_rate/20)
|
||||
def pbToneChangeAll(tone, duration)
|
||||
$game_screen.start_tone_change(tone, duration * Graphics.frame_rate / 20)
|
||||
for picture in $game_screen.pictures
|
||||
picture.start_tone_change(tone,duration*Graphics.frame_rate/20) if picture
|
||||
picture.start_tone_change(tone, duration * Graphics.frame_rate / 20) if picture
|
||||
end
|
||||
end
|
||||
|
||||
def pbShake(power,speed,frames)
|
||||
$game_screen.start_shake(power,speed,frames*Graphics.frame_rate/20)
|
||||
def pbShake(power, speed, frames)
|
||||
$game_screen.start_shake(power, speed, frames * Graphics.frame_rate / 20)
|
||||
end
|
||||
|
||||
def pbFlash(color,frames)
|
||||
$game_screen.start_flash(color,frames*Graphics.frame_rate/20)
|
||||
def pbFlash(color, frames)
|
||||
$game_screen.start_flash(color, frames * Graphics.frame_rate / 20)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user