| 赞 | 0  | 
 
| VIP | 4 | 
 
| 好人卡 | 7 | 
 
| 积分 | 1 | 
 
| 经验 | 5680 | 
 
| 最后登录 | 2019-3-21 | 
 
| 在线时间 | 141 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 60 
 
        - 在线时间
 - 141 小时
 
        - 注册时间
 - 2010-12-30
 
        - 帖子
 - 312
 
 
 
 | 
	
 本帖最后由 魔能奶糖猫 于 2011-4-1 12:29 编辑  
 
回复 5693744 的帖子 
 
用法第八行不多解释- #==============================================================================
 
 - # ■ Window_Variables
 
 - #------------------------------------------------------------------------------
 
 - #  显示变量的窗口。
 
 - #==============================================================================
 
 - module W
 
 -   V = 1 #设置变量的ID
 
 -  STR = {0=>"胡虎虎",1=>"哈哈",2=>"嘿嘿"}
 
 - end
 
  
- class Window_Variables < Window_Base
 
 -   def initialize(x, y)
 
 -     super(x, y, 160, WLH + 32)
 
 -     refresh
 
 -   end
 
 -   def refresh
 
 -     self.contents.clear
 
 -     self.contents.draw_text(4, -4, 120, 32, W::STR[$game_variables[W::V]], 1)
 
 -   end
 
 - end
 
  
- #==============================================================================
 
 - # ■ Window_Steps
 
 - #------------------------------------------------------------------------------
 
 - #  显示脚步数的窗口。
 
 - #==============================================================================
 
 - class Window_Steps < Window_Base
 
 -   def initialize(x, y)
 
 -     super(x, y, 160, WLH + 32)
 
 -     refresh
 
 -   end
 
 -   def refresh
 
 -     self.contents.clear
 
 -     self.contents.draw_text(4, -4, 120, 32, "#{$game_party.steps}步", 2)
 
 -   end
 
 - end
 
  
- #==============================================================================
 
 - # ■ Scene_Menu
 
 - #------------------------------------------------------------------------------
 
 - #  处理菜单画面的类。
 
 - #==============================================================================
 
  
- class Scene_Menu < Scene_Base
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 开始处理
 
 -   #--------------------------------------------------------------------------
 
 -   alias start_v start
 
 -   def start
 
 -     start_v
 
 -     @variables_window = Window_Variables.new(0, 248)
 
 -     @step_window = Window_Steps.new(0, 304)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 结束处理
 
 -   #--------------------------------------------------------------------------
 
 -   alias terminate_v terminate
 
 -   def terminate
 
 -     terminate_v
 
 -     @variables_window.dispose
 
 -     @step_window.dispose
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 更新画面
 
 -   #--------------------------------------------------------------------------
 
 -   alias update_v update
 
 -   def update
 
 -     update_v
 
 -     @variables_window.update
 
 -     @step_windowupdate
 
 -   end
 
 - end
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |