Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Dhoom
- module SplashScreen
- Splash_Graphics = ["splash","splash2"]
- Splash_Total = [9,4]
- Splash_Speed = 10
- Splash_Wait = 60
- end
- end
- module SceneManager
- def self.first_scene_class
- $BTEST ? Scene_Battle : Scene_Splash
- end
- end
- class Scene_Splash < Scene_Base
- include Dhoom::SplashScreen
- def start
- super
- Graphics.freeze
- @index = 0
- @seq = 0
- @sec = 0
- create_splash_graphics
- end
- def create_splash_graphics
- @splash_graphics = Sprite.new
- end
- def update
- super
- if @sec > 0
- @sec -= 1
- else
- update_splash_graphics
- end
- end
- def update_splash_graphics
- if @index > Splash_Graphics.size-1
- SceneManager.call(Scene_Title)
- return
- end
- if @seq < Splash_Total[@index]
- @seq += 1
- @splash_graphics.bitmap = Cache.system(Splash_Graphics[@index]+"_"+@seq.to_s)
- @sec = Splash_Speed
- else
- @seq = 0
- @index += 1
- @sec = Splash_Wait
- end
- end
- def terminate
- super
- @splash_graphics.dispose
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement