Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Scene_Menu < Scene_MenuBase
- alias pre_create_light start
- def start
- pre_create_light
- create_realistic_lights
- end
- def create_realistic_lights
- return unless use_realistic_lights?
- @theo_lights = Spriteset_Light.new(@viewport) unless @theo_lights
- end
- def use_realistic_lights?
- !$game_switches[THEO::LIGHT::DISABLE_SWITCH_ID]
- end
- alias pre_realistic_update_light update
- def update
- pre_realistic_update_light
- update_realistic_light
- check_light_existence
- end
- def update_realistic_light
- @theo_lights.update if @theo_lights
- end
- def check_light_existence
- $game_switches[THEO::LIGHT::DISABLE_SWITCH_ID] ?
- dispose_real_lights : create_realistic_lights
- end
- alias pre_dispose_real_lights terminate
- def terminate
- pre_dispose_real_lights
- dispose_real_lights
- end
- def dispose_real_lights
- if @theo_lights
- @theo_lights.dispose
- @theo_lights = nil
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment