Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # frozen_string_literal: true
- def lightsOn
- $game_screen.start_tone_change(Tone.new(0, 0, 0), 10);
- while $PokemonTemp.darknessSprite.radius<=255
- Graphics.update
- Input.update
- pbUpdateSceneMap
- $PokemonTemp.darknessSprite.radius += 5
- $game_map.fog_opacity -= 20
- end
- $PokemonGlobal.flashUsed = false
- $PokemonTemp.darknessSprite.dispose
- $game_map.fog_name = ""
- $game_switches[59] = false
- $game_map.refresh
- end
- def lightsOff(tone, fog)
- $PokemonGlobal.flashUsed = true
- $PokemonTemp.darknessSprite = DarknessSprite.new
- darkness = $PokemonTemp.darknessSprite
- darkness.radius = 255
- $game_screen.start_tone_change(tone, 10);
- $game_map.fog_name = fog
- $game_map.fog_zoom = 100
- $game_map.fog_opacity = 0
- $scene.spriteset.fog.z = 1
- while darkness.radius>100
- Graphics.update
- Input.update
- pbUpdateSceneMap
- $game_map.fog_opacity += 5
- darkness.radius -= 5
- end
- $scene.spriteset.addUserSprite(darkness)
- $game_switches[59] = true
- $game_map.refresh
- end
- def lightsToggle(tone, fog)
- if !$PokemonTemp.darknessSprite || $PokemonTemp.darknessSprite.disposed?
- lightsOff(tone, fog)
- else
- lightsOn
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement