赞 | 27 |
VIP | 400 |
好人卡 | 13 |
积分 | 17 |
经验 | 69730 |
最后登录 | 2025-3-16 |
在线时间 | 3038 小时 |
Lv3.寻梦者 (暗夜天使) 精灵族の天使
- 梦石
- 0
- 星屑
- 1702
- 在线时间
- 3038 小时
- 注册时间
- 2007-3-16
- 帖子
- 33731
 
|
本帖最后由 精灵使者 于 2011-7-24 18:26 编辑
很显然,你把开关设在了installize里面,dispose本来不存在的窗口肯定不行的啦。
至少也得规避一下吧。- class Window_MapVar < Window_Base
- def initialize
- super(0,420,160,60)
- self.opacity=200
- self.back_opacity=200
- self.contents_opacity=255
- self.visible = $game_switches[3]
- self.contents = Bitmap.new(width - 32, height - 32)
- @var_value_old = -1
- @var_icon = Bitmap.new("Graphics/Icons/纳尼2")
- refresh
- end
- def refresh
- if @var_value_old==$game_variables[1] or $game_switches[3]
- return
- end
- self.contents.clear
- cx = contents.text_size($data_system.words.gold).width
- self.contents.font.color = Color.new(255,255,255)
- self.contents.draw_text(24, 0, 104-cx, 28, $game_variables[1].to_s, 2)
- self.contents.font.color = Color.new(255,255,0)
- self.contents.draw_text(128-cx, 0, cx, 28, "无语")
- self.contents.blt(0, 2, @var_icon, Rect.new(0, 0, 24, 24))
- end
- end
- end
复制代码 应该这样做 |
|