Project1
标题: 自己写的变量窗口不能刷新? [打印本页]
作者: 纳尔德 时间: 2011-6-29 17:29
标题: 自己写的变量窗口不能刷新?
我自己制作了变量脚本,大大们看看哪里出错,
为什么用后而且在Scene_Map里也dispose和update了
为什么+了变量1的值后不改变,需要按一下菜单X键.再按一次X键才刷新了一下.
一下是变量窗口- class Window_rl < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化窗口
- #--------------------------------------------------------------------------
- def initialize
- super(-5, -8, 200, 90)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.back_opacity = 0
- self.opacity = 0
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.size = 18
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.draw_text(2, -29 ,64,72, $game_variables[1].to_s, 1)
- self.contents.draw_text(72,-29 ,64,72, $game_variables[2].to_s, 1)
- self.contents.draw_text(128,-29 ,64,72, $game_variables[3].to_s, 1)
- end
- end
复制代码