设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 118|回复: 0

[转载发布] Game Over +

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-1 17:32:34 | 显示全部楼层 |阅读模式
    Game Over +

    by Todd (or DoctorTodd on RMRK)

    Introduction

    Adds an option window to the GameOver screen.

    Features


    • Plug and play

    Screenshots

    [url=https://forums.rpgmakerweb.com/attachments/capturekb-png.181/][/url]

    Demo

    I don't think it's really necessary.

    Script

    Spoiler                Code:       
    1. #===============================================================================
    2. #
    3. # DT's GameOver +
    4. # Author: DoctorTodd
    5. # Date (04/27/2012)
    6. # Version: (1.0.0) (VXA)
    7. # Level: (Simple)
    8. # Email: Todd@beacongames.com
    9. #
    10. #===============================================================================
    11. #
    12. # NOTES: 1)This script will only work with ace.
    13. #
    14. #===============================================================================
    15. #
    16. # Description: Adds an option window to the GameOver screen.
    17. #
    18. # Credits: Me (DoctorTodd)
    19. #
    20. #===============================================================================
    21. #
    22. # Instructions
    23. # Paste above main.
    24. #
    25. #===============================================================================
    26. #
    27. # Contact me for commercial use, other wise just credit me and don't repost
    28. # without my permission.
    29. #
    30. #===============================================================================
    31. #
    32. # Editing begins 37 and ends on 41.
    33. #
    34. #===============================================================================
    35. module DTGOP
    36.   #The Y coordinate of the Command Window
    37.   COMWINY = 300
    38.   #The X coordinate of the Command Window
    39.   COMWINX = 180
    40. end
    41. #==============================================================================
    42. # ** Window_MenuCommand
    43. #------------------------------------------------------------------------------
    44. #  This command window appears on the menu screen.
    45. #==============================================================================
    46. class Window_GameOverCommand < Window_Command
    47.   #--------------------------------------------------------------------------
    48.   # * Object Initialization
    49.   #--------------------------------------------------------------------------
    50.   def initialize
    51.         super(0, 0)
    52.   end
    53.   #--------------------------------------------------------------------------
    54.   # * Get Window Width
    55.   #--------------------------------------------------------------------------
    56.   def window_width
    57.         return 160
    58.   end
    59.   #--------------------------------------------------------------------------
    60.   # * Get Number of Lines to Show
    61.   #--------------------------------------------------------------------------
    62.   def visible_line_number
    63.         item_max
    64.   end
    65.   #--------------------------------------------------------------------------
    66.   # * Create Command List
    67.   #--------------------------------------------------------------------------
    68.   def make_command_list
    69.         add_load_command
    70.         add_title_command
    71.         add_original_commands
    72.         add_quit_command
    73.   end
    74.   #--------------------------------------------------------------------------
    75.   # * Add load to Command List
    76.   #--------------------------------------------------------------------------
    77.   def add_load_command
    78.    add_command("Load", :load)
    79.   end
    80.   #--------------------------------------------------------------------------
    81.   # * For Adding Original Commands
    82.   #--------------------------------------------------------------------------
    83.   def add_original_commands
    84.   end
    85.   #--------------------------------------------------------------------------
    86.   # * Add Title to Command List
    87.   #--------------------------------------------------------------------------
    88.   def add_title_command
    89.         add_command("Title", :title)
    90.   end
    91.   #------------------------------------------------------------------------
    92.   # * Add quit Game to Command List
    93.   #--------------------------------------------------------------------------
    94.   def add_quit_command
    95.         add_command("Shutdown", :quit)
    96.   end
    97. end
    98. #==============================================================================
    99. # ** Scene_Gameover
    100. #------------------------------------------------------------------------------
    101. #  This class performs game over screen processing.
    102. #==============================================================================
    103. class Scene_Gameover < Scene_Base
    104.   #--------------------------------------------------------------------------
    105.   # * Start Processing
    106.   #--------------------------------------------------------------------------
    107.   def start
    108.         super
    109.         play_gameover_music
    110.         fadeout_frozen_graphics
    111.         create_background
    112.         create_command_window
    113.   end
    114.   #--------------------------------------------------------------------------
    115.   # * Termination Processing
    116.   #--------------------------------------------------------------------------
    117.   def terminate
    118.         super
    119.         dispose_background
    120.   end
    121.   #--------------------------------------------------------------------------
    122.   # * Create Command Window
    123.   #--------------------------------------------------------------------------
    124.   def create_command_window
    125.         @command_window =  Window_GameOverCommand.new
    126.         @command_window.set_handler(:load,          method(:command_load))
    127.         @command_window.set_handler(:title,         method(:command_title))
    128.         @command_window.set_handler(:quit,          method(:command_quit))
    129.         @command_window.y = (DTGOP::COMWINY)
    130.         @command_window.x = (DTGOP::COMWINX)
    131.         end
    132.   #--------------------------------------------------------------------------
    133.   # * Execute Transition
    134.   #--------------------------------------------------------------------------
    135.   def perform_transition
    136.         Graphics.transition(fadein_speed)
    137.   end
    138.   #--------------------------------------------------------------------------
    139.   # * Play Music on Game Over Screen
    140.   #--------------------------------------------------------------------------
    141.   def play_gameover_music
    142.         RPG::BGM.stop
    143.         RPG::BGS.stop
    144.         $data_system.gameover_me.play
    145.   end
    146.   #--------------------------------------------------------------------------
    147.   # * Fade Out Frozen Graphics
    148.   #--------------------------------------------------------------------------
    149.   def fadeout_frozen_graphics
    150.         Graphics.transition(fadeout_speed)
    151.         Graphics.freeze
    152.   end
    153.   #--------------------------------------------------------------------------
    154.   # * Create Background
    155.   #--------------------------------------------------------------------------
    156.   def create_background
    157.         @sprite = Sprite.new
    158.         @sprite.bitmap = Cache.system("GameOver")
    159.   end
    160.   #--------------------------------------------------------------------------
    161.   # * Free Background
    162.   #--------------------------------------------------------------------------
    163.   def dispose_background
    164.         @sprite.bitmap.dispose
    165.         @sprite.dispose
    166.   end
    167.   #--------------------------------------------------------------------------
    168.   # * Get Fade Out Speed
    169.   #--------------------------------------------------------------------------
    170.   def fadeout_speed
    171.         return 60
    172.   end
    173.   #--------------------------------------------------------------------------
    174.   # * Get Fade In Speed
    175.   #--------------------------------------------------------------------------
    176.   def fadein_speed
    177.         return 120
    178.   end
    179.   #--------------------------------------------------------------------------
    180.   # * [Load] Command
    181.   #--------------------------------------------------------------------------
    182.   def command_load
    183.         SceneManager.call(Scene_Load)
    184.   end
    185.   #--------------------------------------------------------------------------
    186.   # * [Title] Command
    187.   #--------------------------------------------------------------------------
    188.   def command_title
    189.         SceneManager.call(Scene_Title)
    190.   end
    191.   #--------------------------------------------------------------------------
    192.   # * [Quit] Command
    193.   #--------------------------------------------------------------------------
    194.   def command_quit
    195.         fadeout_all
    196.         SceneManager.exit
    197.   end
    198. end
    复制代码





    FAQ

    None right now.

    Credit and Thanks

    - Todd

    Author's Notes

    Free for non-commercial and commercial games. You must credit me! If you use this in a commercial game I expect a free copy.


    本贴来自国际rpgmaker官方论坛作者:Todd处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/game-over.1719/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-18 08:55 , Processed in 0.137270 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表