#============================================================================
# 〇 地图显示血条魔条
# By.冰舞蝶恋
#----------------------------------------------------------------------------
# 说明:显示的文字可自由更动来达到游戏需要的效果。
#----------------------------------------------------------------------------
# 以下是作者的白痴留言,尽管无视吧!
# 啊哈哈!这可是咱第一个独立完成的脚本吖!!
# 一时无聊做的……兴许可以用在ARPG之类的地方吧。偶然看到有不少人在拿RM做
# ARPG,又发现似乎没有(除了邪恶的fux2字眼的那个- -||b),做了个比较完善
# 的……排版不是很好看,坐标可以自己调整。
#============================================================================
#==============================================================================
# ■ Scene_Map
#------------------------------------------------------------------------------
# 处理地图画面的类。
#==============================================================================
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def start
super
$game_map.refresh
@spriteset = Spriteset_Map.new
@message_window = Window_Message.new
@mapz_window = Window_MapZ.new(0, 0)
end
#--------------------------------------------------------------------------
# ● 结束处理
#--------------------------------------------------------------------------
def terminate
super
@mapz_window.dispose
if $scene.is_a?(Scene_Battle) # 切换至战斗场景的场合
@spriteset.dispose_characters # 隐藏角色来生成战斗背景
end
snapshot_for_background
@spriteset.dispose
@message_window.dispose
if $scene.is_a?(Scene_Battle) # 切换至战斗场景的场合
perform_battle_transition # 执行战斗渐变
end
end
#--------------------------------------------------------------------------
# ● 基本更新处理
#--------------------------------------------------------------------------
def update_basic
Graphics.update # 更新游戏画面
Input.update # 更新输入信息
$game_map.update # 更新地图
@spriteset.update # 更新活动块组
end
#--------------------------------------------------------------------------
# ● 更新画面
#--------------------------------------------------------------------------
def update
super
$game_map.interpreter.update # 更新解释器
$game_map.update # 更新地图
$game_player.update # 更新主角
$game_system.update # 更新计时器
@mapz_window.update
@spriteset.update # 更新活动块组
@message_window.update # 更新信息窗口
unless $game_message.visible # 信息窗口显示中除外
update_transfer_player
update_encounter
update_call_menu
update_call_debug
update_scene_change
end
end
end
class Window_MapZ < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize(x,y)
super(-12, -12, 544+16,416+16)
self.opacity = 0
update
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def update
self.contents.clear
#~ $game_map.screen.pictures[1].show("头像", 0, 0, 0, 100, 100, 255, 0)
draw_actor_hp($game_actors[1], 80+12, 0, 160)
draw_actor_mp($game_actors[1], 80+12, 32, 160)
self.contents.font.color = normal_color
self.contents.draw_text(84+12, 52+8, 544, WLH, "#{$game_actors[1].name} Lv.#{$game_actors[1].level}")
self.contents.font.color = system_color
self.contents.draw_text(0+96+120+40, 0-4, 544, WLH, "攻:")
self.contents.draw_text(0+96+120+40, 22-4, 544, WLH, "防:")
self.contents.draw_text(0+96+120+40, 44-4, 544, WLH, "法:")
self.contents.draw_text(0+96+120+40, 66-4, 544, WLH, "敏:")
self.contents.draw_text(0+96+120+96+40, 0-4, 544, WLH, "所持金钱:")
self.contents.draw_text(-18, 22-4, 544, WLH, "G", 2)
self.contents.font.color = normal_color
self.contents.draw_text(-456+96+120+40, 0-4, 544, WLH, $game_actors[1].atk, 2)
self.contents.draw_text(-456+96+120+40, 22-4, 544, WLH, $game_actors[1].def, 2)
self.contents.draw_text(-456+96+120+40, 44-4, 544, WLH, $game_actors[1].spi, 2)
self.contents.draw_text(-456+96+120+40, 66-4, 544, WLH, $game_actors[1].cri, 2)
self.contents.draw_text(-36, 22-4, 544, WLH, $game_party.gold, 2)
end
end