#==============================================================================
# ■ Game_Player
#------------------------------------------------------------------------------
# 处理玩家人物的类。拥有事件启动的判定、地图的卷动等功能。
# 本类的实例请参考 $game_player 。
#==============================================================================
class Game_Player < Game_Character
def getX
@x
end
def getY
@y
end
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# 菜单画面
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● 生成窗口
#--------------------------------------------------------------------------
def create_gold_window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = Graphics.height - @gold_window.height
# 生成地图信息窗口
@mapinfos_window = Window_MapInfo.new
@mapinfos_window.x = 0
@mapinfos_window.y = Graphics.height - @mapinfos_window.height - @gold_window.height
end
end
#==============================================================================
# ■ Window_MapInfo
#------------------------------------------------------------------------------
# 显示当前信息的窗口。 By SkyZH
#==============================================================================
class Window_MapInfo < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, 120)
self.opacity = 255
refresh
end
#--------------------------------------------------------------------------
# ● 获取窗口的宽度
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
@a=$game_map.width
@b=$game_map.height
draw_text(0, 0, window_width-24, line_height,"地图 " + $game_map.display_name)
draw_text(0, line_height, window_width-24, line_height,"坐标 " + "X" + $game_player.getX.to_s + "," + "Y" + $game_player.getY.to_s)
draw_text(0, line_height*2, window_width-24, line_height,"时间 " + $game_system.playtime_s)
draw_text(0, line_height*3, window_width-24, line_height,"声望 " + $game_variables[6].to_s)
end
end
class Spriteset_Map
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
create_viewports
create_tilemap
create_parallax
create_characters
create_shadow
create_weather
create_pictures
create_timer
@MapInfoWin=Window_MapInfo.new
update
end
def dispose
dispose_tilemap
dispose_parallax
dispose_characters
dispose_shadow
dispose_weather
dispose_pictures
dispose_timer
dispose_viewports
@MapInfoWin.dispose
end
def update
update_tileset
update_tilemap
update_parallax
update_characters
update_shadow
update_weather
update_pictures
update_timer
update_viewports
if $game_switches[40]==false then #通过40号开关控制信息窗口是否显示
@MapInfoWin.visible=false
else
@MapInfoWin.visible=true
end
@MapInfoWin.refresh
end
end