| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 7 |
| 经验 | |
| 最后登录 | 2026-7-8 |
| 在线时间 | 292 小时 |
- 梦石
- 0
- 星屑
- 720
- 在线时间
- 292 小时
- 注册时间
- 2007-1-6
- 回帖
- 143
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 江南小帅瓜 于 2011-3-26 16:53 编辑
不想用的时候,地图上老是出现总击两个字。- #==============================================================================
- # ■ Window_Veri
- #------------------------------------------------------------------------------
- #IamI版权所有 Yui部分修改
- #==============================================================================
- # 说明:基本原理如下。Scene每帧调用一次这里的update方法,
- # update检查变量1是否改变,如果改变那么刷新画面。
- class Window_Veri < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化窗口
- #--------------------------------------------------------------------------
- def initialize
- super(0, 100, 200,100)
- self.opacity = 0
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- #================加入===============
- @lastvalue = $game_variables[34]
- #===================================
- self.contents.clear
- #self.contents.draw_text(self.contents.rect,$game_variables[35].to_s)
- self.contents.font.color = Color.new(255, 0 , 0, 255)
- self.contents.draw_text(0, 35, 120, 30, " 总击")
- self.contents.font.color = normal_color
- self.contents.draw_text(2,35,120,30, $game_variables[34].to_s,2)
- end
- #--------------------------------------------------------------------------
- # ● 重要,修改
- #--------------------------------------------------------------------------
- def update
- refresh if @lastvalue != $game_variables[34]
- end
- #===========================================================================
- end
- class Scene_Map
- alias old_main main
- def main
- @veri = Window_Veri.new
- @veri.x=10
- @veri.y=280
- old_main
- @veri.dispose
- end
- alias old_update update
- def update
- old_update
- #==================重要=====================
- @veri.update
- #===========================================
- end
- end
复制代码 |
|