pigu_6

GONZO| GAME OVER

Nov 24th, 2012
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. #-----------------------------------------------------------------------------
  2. # GONZO_GAME OVER
  3. #------------------------------#_______________#------------------------------
  4. # Su Funcion es Facil Mustra Las Opciones de Nuevo Juego, Continuar y Salir
  5. # En el Menu de Game Over.
  6. #=============================================================================
  7. # Para Usarlo Pegar Encima de MAIN.
  8. #-----------------------------------------------------------------------------
  9. # OFICIAL WEB SITE: www.imperial-maker.foroactivos.net
  10. # y no podríamos olvidar a la fantástica: www.mundo-maker.com
  11. # (eso por listo ;D)
  12. #-----------------------------------------------------------------------------
  13.  
  14. class Scene_Gameover < Scene_Base
  15. #=============================================================================
  16. def start
  17. super
  18. SceneManager.clear
  19. play_gameover_music
  20. fadeout_frozen_graphics
  21. create_command_window
  22. create_background
  23. end
  24. #==============================================================================
  25. def terminate
  26. super
  27. dispose_background
  28. end
  29. #==============================================================================
  30. def update
  31. super
  32. goto_title if Input.trigger?(:C)
  33. end
  34. #==============================================================================
  35. def perform_battle_transition
  36. Graphics.transition(60, "Graphics/System/BattleStart", 100)
  37. Graphics.freeze
  38. end
  39.  
  40. #==============================================================================
  41. def play_gameover_music
  42. RPG::BGM.stop
  43. RPG::BGS.stop
  44. $data_system.gameover_me.play
  45. end
  46. #==============================================================================
  47. def fadeout_frozen_graphics
  48. Graphics.transition(fadeout_speed)
  49. Graphics.freeze
  50. end
  51. #==============================================================================
  52. def create_background
  53. @sprite = Sprite.new
  54. @sprite.bitmap = Cache.system("GameOver")
  55. end
  56. #==============================================================================
  57. def dispose_background
  58. @sprite.bitmap.dispose
  59. @sprite.dispose
  60. end
  61. #==============================================================================
  62. def fadeout_speed
  63. return 60
  64. end
  65. #==============================================================================
  66. def fadein_speed
  67. return 120
  68. end
  69. #==============================================================================
  70. def goto_title
  71. fadeout_all
  72. SceneManager.goto(Scene_Title)
  73. end
  74. #=============================================================================
  75. def create_command_window
  76. @command_window = Window_TitleCommand.new
  77. @command_window.set_handler(:new_game, method(:command_new_game))
  78. @command_window.set_handler(:continue, method(:command_continue))
  79. @command_window.set_handler(:shutdown, method(:command_shutdown))
  80. end
  81. #=============================================================================
  82. def close_command_window
  83. @command_window.close
  84. update until @command_window.close?
  85. end
  86. #=============================================================================
  87. def command_new_game
  88. DataManager.setup_new_game
  89. close_command_window
  90. fadeout_all
  91. $game_map.autoplay
  92. SceneManager.goto(Scene_Map)
  93. end
  94. #=============================================================================
  95. def command_continue
  96. close_command_window
  97. SceneManager.call(Scene_Load)
  98. end
  99. #=============================================================================
  100. def command_shutdown
  101. close_command_window
  102. fadeout_all
  103. SceneManager.exit
  104. end
  105. end
Advertisement
Add Comment
Please, Sign In to add comment