Advertisement
SYDONAY

▼ SYDOSCRIPTS [SS] - SPLASH SCREEN ▼

Apr 16th, 2014
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 5.01 KB | None | 0 0
  1. #--------------------------------------------------------------------------
  2. # SydoSplash Screen V2 - Made by: SYDONAY, Edits Made by Vindaca
  3. #--------------------------------------------------------------------------
  4. # Instruction: There is a customizable area below, and make sure all images
  5. # are imported to the Title1 folder of your project's Graphics folder.
  6. #
  7. # Script credits: SYDONAY (Gekido Entertainment) and Vindaca.
  8. # If you are going to use the script, credit the writer.
  9. # Script is allowed to be used both in commercial and non-commercial games.
  10. #--------------------------------------------------------------------------module SydoSplashScreen
  11. #==============================================================================
  12. # ** SydoSplashScreen
  13. #------------------------------------------------------------------------------
  14. #  This module manages the customizable and the methods for the splash scene.
  15. #==============================================================================
  16. module SydoSplashScreen
  17. #==============================================================================
  18. # ** Specs
  19. #------------------------------------------------------------------------------
  20. #  This module manages the customizable for the splash scene.
  21. #==============================================================================
  22.   module Specs
  23. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  24. #                                                                              #
  25. #                           Start Customizable Area.                           #
  26. #                                                                              #
  27. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  28. #                                                                              #
  29. #                        ONLY EDIT THE DESIGNATED AREAS.                       #
  30. #                                                                              #
  31. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  32.  
  33.  
  34.  
  35.   #============================================================================
  36.   # * Splash Effects
  37.   #============================================================================
  38.  
  39.     Splash_Effects = {
  40.    
  41.     # Image Name
  42.           "Splash1" => { :sound_effects => ["Applause1", 74, 74],
  43.                         :fadein_time => 30,
  44.                         :wait => 200,
  45.                         :fadeout_time => 30,
  46.                        },
  47.                        
  48.        "Splash2" => { :sound_effects => ["Applause1", 74, 74],
  49.                         :fadein_time => 30,
  50.                         :wait => 200,
  51.                         :fadeout_time => 30,
  52.                        },
  53.     }
  54.  
  55.   end #<--- End of Specs Module================================================
  56.  
  57.  
  58. #==============================================================================
  59. # ** Methods
  60. #------------------------------------------------------------------------------
  61. #  This module manages the methods for the splash scene.
  62. #==============================================================================
  63.   module Methods
  64.     include SydoSplashScreen::Specs
  65.  
  66.     def self.start_splashing
  67.       @sprite = Sprite.new
  68.       Graphics.fadeout(0)
  69.       Splash_Effects.each_key { |i| splashin(i) }
  70.       @sprite.dispose
  71.     end
  72.    
  73.     def self.play_splash_se(index)
  74.       sound_effect = "Audio/SE/" + Splash_Effects[index][:sound_effects][0]
  75.       pitch = Splash_Effects[index][:sound_effects][1]
  76.       volume = Splash_Effects[index][:sound_effects][2]
  77.       Audio.se_play(sound_effect, pitch, volume)
  78.     end
  79.    
  80.     def self.splashin(index)
  81.       play_splash_se(index)
  82.       @sprite.bitmap = Cache.title1(index)
  83.       Graphics.fadein(Splash_Effects[index][:fadein_time])
  84.       Graphics.wait(Splash_Effects[index][:wait])
  85.       Graphics.fadeout(Splash_Effects[index][:fadeout_time])
  86.       @sprite.bitmap.dispose
  87.     end
  88.    
  89.   end #<--- End of Methods Module==============================================
  90.  
  91. end #<--- End of SydoSplashScreen Module=======================================
  92.  
  93.  
  94. #==============================================================================
  95. # ** SceneManager
  96. #------------------------------------------------------------------------------
  97. #  This module manages scene transitions. For example, it can handle
  98. # hierarchical structures such as calling the item screen from the main menu
  99. # or returning from the item screen to the main menu.
  100. #==============================================================================
  101.  
  102. module SceneManager
  103.  
  104.   #--------------------------------------------------------------------------
  105.   # * Get First Scene Class
  106.   #--------------------------------------------------------------------------
  107.   def self.first_scene_class
  108.     SydoSplashScreen::Methods::start_splashing
  109.     $BTEST ? Scene_Battle : Scene_Title
  110.   end
  111.  
  112. end #<--- End of SceneManager Module===========================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement