赞 | 27 |
VIP | 400 |
好人卡 | 13 |
积分 | 17 |
经验 | 69730 |
最后登录 | 2025-8-2 |
在线时间 | 3039 小时 |
Lv3.寻梦者 (暗夜天使) 精灵族の天使
- 梦石
- 0
- 星屑
- 1707
- 在线时间
- 3039 小时
- 注册时间
- 2007-3-16
- 帖子
- 33731
 
|
太简单了……
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
if $game_switches[XY_SWITCH] #确定开关是否打开,可以自己改变开关
@x = $game_player.x #获取角色X坐标
@y = $game_player.y #获取角色Y坐标
@id = $game_map.map_id #获取地图编号
self.contents.clear #清除以前的东西
$mapnames = load_data("Data/MapInfos.rxdata") #读取地图名文件
map_name = $mapnames[@id].name #获得地图名
self.contents.font.color = normal_color#颜色,这里是白色~
self.contents.draw_text(0, 0, 116, 32, map_name,2)
self.contents.font.color = system_color#颜色,暗蓝色
self.contents.draw_text(0, 32, 120, 32, "X:")#显示X这个字的位置,引号里面的内容随便改,比如"X坐标地址"
self.contents.font.color = normal_color#颜色,这里是白色~
self.contents.draw_text(0, 32, 52, 32, @x.to_s,2)
self.contents.font.color = system_color#上面那个是X坐标的变量,可以自己更改变量名~
self.contents.draw_text(64, 32, 128, 32, "Y:")#显示Y这个字~
self.contents.font.color = normal_color
self.contents.draw_text(0, 32, 116, 32, @y.to_s,2)
end
end ###########################################################################
# 下面的东西不需要掌握~ #
###########################################################################
class Scene_Map
alias xy_66rpg_main main
def main
@xy_window = Window_xy.new
@xy_window.x = 640 - 160
@xy_window.y = 480 - 96
@xy_window.opacity = 0
xy_66rpg_main
@xy_window.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
alias xy_66rpg_update update
def update
xy_66rpg_update
if $game_switches[XY_SWITCH]
@xy_window.visible = true
@xy_window.refresh if @xy_window.judge
else
@xy_window.visible = false
end
end
end
把以前带彩的2个地方的
if $game_switches[XY_SWITCH == 25]
改为
if $game_switches[XY_SWITCH]
否则会出错。 |
|