赞 | 5 |
VIP | 71 |
好人卡 | 22 |
积分 | 6 |
经验 | 32145 |
最后登录 | 2013-8-9 |
在线时间 | 184 小时 |
Lv2.观梦者 天仙
- 梦石
- 0
- 星屑
- 620
- 在线时间
- 184 小时
- 注册时间
- 2008-4-15
- 帖子
- 5023
|
- #================================================
- # ■ Window_Pos
- #================================================
- class Window_Pos < Window_Base
- #------------------------------------------------
- # ● 初始化
- #------------------------------------------------
- def initialize
- super(0, 0, 122, 52) # 显示的位置在这里改
- self.z = 151
- self.contents.font.size = 20
- refresh
- end
- #------------------------------------------------
- # ● 刷新
- #------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- @x,@y = $game_player.x,$game_player.y
- name = $data_mapinfos[@map_id].name
- self.contents.draw_text(0, 0, 90, 20, "#{name}:(#{@x},#{@y})", 1)
- end
- #------------------------------------------------
- # ● 更新
- #------------------------------------------------
- def update
- return if $game_player.x == @x and $game_player.y == @y
- refresh
- end
- end
- class Scene_Title < Scene_Base
- #------------------------------------------------
- # ● 数据库载入
- #------------------------------------------------
- alias old_ld load_database
- def load_database
- old_ld
- $data_mapinfos = load_data("Data/MapInfos.rvdata")
- end
- end
- class Scene_Map < Scene_Base
- #------------------------------------------------
- # ● 开始
- #------------------------------------------------
- alias old_start start
- def start
- old_start
- @pos_window = Window_Pos.new
- end
- #------------------------------------------------
- # ● 结束
- #------------------------------------------------
- alias old_ter terminate
- def terminate
- old_ter
- @pos_window.dispose
- end
- #------------------------------------------------
- # ● 更新
- #------------------------------------------------
- alias old_update update
- def update
- old_update
- @pos_window.update
- end
- end
复制代码 系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~ |
|