加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
我在窗口里放了张图片,切换场景的时候已经加入释放了,怎么切换场景的时候图片要等几秒才会消失?是不是在窗口里面还要加上释放图片
#============================================================================== # ■ Window_DuiTouxiang #------------------------------------------------------------------------------ # 处理地图界面全体队员头像的类 #============================================================================== class Window_DuiTouxiang < Window_Base #-------------------------------------------------------------------------- # ● 初始化对像 #-------------------------------------------------------------------------- def initialize super(530, -12, 282, 90) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = 12 self.contents.font.name = (["黑体"]) self.opacity = 0 refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh # 清除自身描绘 self.contents.clear for i in 0...$game_party.actors.size x = i * -49 actor = $game_party.actors[i] # 头像 draw_actor_face_jiemian(actor, x+276-80, 0) # 头像框 draw_map_tx_duiwu(actor, x+276-80, 0) # 等级 draw_actor_level_jiemian(actor, x+247-80, 23) # 气血条 draw_map_hp_duiwu(actor, x+278-80, 46) # 魔法条 draw_map_sp_duiwu(actor, x+278-80, 52) end # 队伍人数大于1 if $game_party.actors.size > 1 # 显示队长标记图片 @duibiao = Sprite.new @duibiao.bitmap = Bitmap.new("Graphics/Pictures/图片显示/头像/头像框ui/队标") @duibiao.x = 780 @duibiao.y = 7 @duibiao.z = 300 # 显示窗口 self.visible = true else # 隐藏窗口 self.visible = false end end #-------------------------------------------------------------------------- # 以下为插件功能,增加判定同步刷新头像 alias refresh_fix_refresh refresh unless $@ alias refresh_fix_update update unless $@ #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh(*args) @datas = [] if @datas.nil? @datas.clear $game_party.actors.each {|item|@datas << [item.id, item.hp, item.sp, item.exp]} refresh_fix_refresh(*args) end #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update(*args) refresh_fix_update(*args) return refresh if ($game_party.actors.size != (@datas ? @datas.size : 0)) $game_party.actors.each_with_index {|item, index| next if @datas[index] == [item.id, item.hp, item.sp, item.exp] break refresh} end end
#==============================================================================
# ■ Window_DuiTouxiang
#------------------------------------------------------------------------------
# 处理地图界面全体队员头像的类
#==============================================================================
class Window_DuiTouxiang < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(530, -12, 282, 90)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 12
self.contents.font.name = (["黑体"])
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
# 清除自身描绘
self.contents.clear
for i in 0...$game_party.actors.size
x = i * -49
actor = $game_party.actors[i]
# 头像
draw_actor_face_jiemian(actor, x+276-80, 0)
# 头像框
draw_map_tx_duiwu(actor, x+276-80, 0)
# 等级
draw_actor_level_jiemian(actor, x+247-80, 23)
# 气血条
draw_map_hp_duiwu(actor, x+278-80, 46)
# 魔法条
draw_map_sp_duiwu(actor, x+278-80, 52)
end
# 队伍人数大于1
if $game_party.actors.size > 1
# 显示队长标记图片
@duibiao = Sprite.new
@duibiao.bitmap = Bitmap.new("Graphics/Pictures/图片显示/头像/头像框ui/队标")
@duibiao.x = 780
@duibiao.y = 7
@duibiao.z = 300
# 显示窗口
self.visible = true
else
# 隐藏窗口
self.visible = false
end
end
#--------------------------------------------------------------------------
# 以下为插件功能,增加判定同步刷新头像
alias refresh_fix_refresh refresh unless $@
alias refresh_fix_update update unless $@
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh(*args)
@datas = [] if @datas.nil?
@datas.clear
$game_party.actors.each {|item|@datas << [item.id, item.hp, item.sp, item.exp]}
refresh_fix_refresh(*args)
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update(*args)
refresh_fix_update(*args)
return refresh if ($game_party.actors.size != (@datas ? @datas.size : 0))
$game_party.actors.each_with_index {|item, index|
next if @datas[index] == [item.id, item.hp, item.sp, item.exp]
break refresh}
end
end
|