Project1
标题:
更正一个错误
[打印本页]
作者:
CIS狂人
时间:
2008-1-25 03:54
标题:
更正一个错误
本人在地图显名脚本里发现严重错误....特更正如下:
#==============================================================================
# ■ Window_Pos
#==============================================================================
class Window_Pos < Window_Base
#--------------------------------------------------------------------------
# ● 初始化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 122, 52)
self.z = 151
self.contents.font.size = 15
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@map_id = $game_map.map_id
name = $data_mapinfos[@map_id].name
self.contents.font.color = system_color
@x,@y = $game_player.x,$game_player.y
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 and $game_map.map_id == @map_id
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
复制代码
作者:
CIS狂人
时间:
2008-1-25 03:57
啊...最近才看到地图转换时候脚本不好使了。专门给菜鸟用的。沙发备用……
作者:
王逸尘
时间:
2008-1-25 04:01
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1