Guest User

Heca's Scene Creator

a guest
Jan 16th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 5.77 KB | None | 0 0
  1. #==============================================================================#
  2. #                                                                              #
  3. #  Heca's Scene Creator                                                        #
  4. #  Author: Heca II                                                             #
  5. #  Date: 16/01/2016 to ///                                                     #
  6. #  Version: (1.0.0) (VX Ace)                                                   #
  7. #  Native Language = Spanish                                                   #
  8. #  I'm new with this but I know some things x_x                                #
  9. #==============================================================================#
  10. #==============================================================================#
  11. #                                                                              #
  12. #  Credits = Me                                                                #
  13. #  Free for non-commercial and commercial (you have to credit me)              #                            #
  14. #==============================================================================#
  15. #==============================================================================#
  16. #                                                                              #
  17. #  Paste script above Main                                                     #                             #
  18. #==============================================================================#
  19. #==============================================================================#
  20. #                                                                              #
  21. #  I will write "EditableX" with things that need to edit together             #                             #
  22. #==============================================================================#
  23.  class Heca_Scene_Creator < Scene_Base
  24.   #--------------------------------------------------------------------------
  25.   # Start Script
  26.   #--------------------------------------------------------------------------
  27.   def start
  28.     super
  29.     create_background
  30.     create_command_window
  31.   end
  32.   #--------------------------------------------------------------------------
  33.   # Pre-Termination Processing
  34.   #--------------------------------------------------------------------------
  35.   def pre_terminate
  36.     super
  37.     close_command_window
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # Transition Speed
  41.   #--------------------------------------------------------------------------
  42.   def transition_speed
  43.     return 20 #Editable
  44.   end
  45.  
  46.   #--------------------------------------------------------------------------
  47.   # Create Background
  48.   #--------------------------------------------------------------------------
  49.   def create_background
  50.     @spritech = Sprite.new
  51.     @spritech.bitmap = Cache.system(HECASSCENECREATOR::BACKGROUND) #EditableB #EditableFolder
  52.     @spritech.tone.set(0, 0, 0, 180) #Editable (RGB)
  53.     #"system" = Picture Folder
  54.  
  55.     end
  56.   #--------------------------------------------------------------------------
  57.   # Create Text
  58.   #--------------------------------------------------------------------------
  59.   def make_command_list
  60.     add_command(HECASSCENECREATOR::SAVETEXT, :save) #Editable1
  61.     add_command(HECASSCENECREATOR::LOADTEXT, :load) #Editable2
  62.     add_command(HECASSCENECREATOR::SHUTDOWNTEXT, :shutdown) #Editable3
  63.     add_command(HECASSCENECREATOR::TITLETEXT, :title) #Editable4
  64.     add_command(HECASSCENECREATOR::CANCELTEXT, :cancel) #Editable5
  65.    
  66.   end  
  67.   #--------------------------------------------------------------------------
  68.   # Create Command Window
  69.   #--------------------------------------------------------------------------
  70.   def create_command_window
  71.     @command_window = Heca_Scene_Creator_Base.new
  72.     @command_window.set_handler(:save, method(:command_save)) #Editable1
  73.     @command_window.set_handler(:load, method(:command_load)) #Editable2
  74.     @command_window.set_handler(:shutdown, method(:command_shutdown)) #Editable3
  75.     @command_window.set_handler(:title, method(:command_title)) #Editable4
  76.     @command_window.set_handler(:cancel, method(:command_cancel))#Editable5
  77.    
  78.   end
  79.   #--------------------------------------------------------------------------
  80.   # Save Command
  81.   #--------------------------------------------------------------------------
  82.   def command_save
  83.     SceneManager.call(Scene_Save) #Editable1
  84.   end
  85.   #--------------------------------------------------------------------------
  86.   # Load Command
  87.   #--------------------------------------------------------------------------
  88.   def command_load
  89.     SceneManager.call(Scene_Load) #Editable2
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # Shutdown Command
  93.   #--------------------------------------------------------------------------
  94.   def command_shutdown
  95.     close_command_window
  96.     fadeout_all
  97.     SceneManager.exit #Editable3
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # Title Command
  101.   #--------------------------------------------------------------------------
  102.   def command_title
  103.     SceneManager.call(Scene_Title) #Editable4
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # Cancel Command
  107.   #--------------------------------------------------------------------------
  108.   def command_cancel
  109.     close_command_window
  110.     return_scene
  111.   end
  112.   #--------------------------------------------------------------------------
  113.   # * Close Command Window
  114.   #--------------------------------------------------------------------------
  115.   def close_command_window
  116.     @command_window.close
  117.     update until @command_window.close?
  118.   end
  119. end
Add Comment
Please, Sign In to add comment