Project1

标题: 第一锅标题附加 [打印本页]

作者: A.S.002    时间: 2013-2-7 20:54
标题: 第一锅标题附加
最近时间太少,亲各位见谅
直接上脚本
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Window_TitleCommand
  4. #------------------------------------------------------------------------------
  5. #  标题画面中,选择“开始游戏/继续游戏”的窗口。
  6. #==============================================================================

  7. class Window_TitleCommand < Window_Command
  8.   #--------------------------------------------------------------------------
  9.   # ● 初始化对象
  10.   #--------------------------------------------------------------------------
  11.   def initialize
  12.     super(0, 0)
  13.     update_placement
  14.     select_symbol(:continue) if continue_enabled
  15.     self.openness = 0
  16.     open
  17.   end
  18.   #--------------------------------------------------------------------------
  19.   # ● 获取窗口的宽度
  20.   #--------------------------------------------------------------------------
  21.   def window_width
  22.     return 120
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 获取窗口的高度
  26.   #--------------------------------------------------------------------------
  27.   def window_height
  28.     return 48
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 更新窗口的位置
  32.   #--------------------------------------------------------------------------
  33.   def update_placement
  34.     self.x = (Graphics.width - width) / 2
  35.     self.y = (Graphics.height * 1.6 - height) / 2
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● 生成指令列表
  39.   #--------------------------------------------------------------------------
  40.   def make_command_list
  41.     add_command(Vocab::new_game, :new_game)
  42.     add_command(Vocab::continue, :continue, continue_enabled)
  43.     add_command(Vocab::shutdown, :shutdown)
  44.   end
  45.   #--------------------------------------------------------------------------
  46.   # ● 获取“继续游戏”选项是否有效
  47.   #--------------------------------------------------------------------------
  48.   def continue_enabled
  49.     DataManager.save_file_exists?
  50.   end
  51. end
复制代码
效果自见(怪)




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1