加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
#============================================================================== # ■ Window_Head #------------------------------------------------------------------------------ # 显示头像的窗口。 #============================================================================== class Window_Head < Window_Base #-------------------------------------------------------------------------- # ● 初始化窗口 #-------------------------------------------------------------------------- def initialize super(0, 320, 160, 160) self.contents = Bitmap.new(width - 32, height - 32) @a = Sprite.new @a.x = self.x + 20 ; @a.y = self.y + 20 ; @a.z = self.z + 1 @a.zoom_x = @a.zoom_y = 0.5 refresh end def dispose super @a.dispose if !@a.nil? end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear if $scene.active_battler.nil? @a.bitmap = Bitmap.new("Graphics/Heads/head_#{$game_party.actors[0].id}") else @a.bitmap = Bitmap.new("Graphics/Heads/head_#{$scene.active_battler.id}") end end end #============================================================================== # ■ Window_Head #------------------------------------------------------------------------------ # 显示敌人头像的窗口。 #============================================================================== class Window_Head2 < Window_Base #-------------------------------------------------------------------------- # ● 初始化窗口 #-------------------------------------------------------------------------- def initialize super(480, 320, 160, 160) self.contents = Bitmap.new(width - 32, height - 32) @a = Sprite.new @a.x = self.x + 20 ; @a.y = self.y + 20 ; @a.z = self.z + 1 @a.zoom_x = @a.zoom_y = 0.5 refresh end def dispose super @a.dispose if !@a.nil? end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear if $scene.active_battler.nil? @a.bitmap = Bitmap.new("Graphics/Heads/head2_#{$game_troop.enemies[0].id}") else @a.bitmap = Bitmap.new("Graphics/Heads/head2_#{$scene.active_battler.id}") end end end
#==============================================================================
# ■ Window_Head
#------------------------------------------------------------------------------
# 显示头像的窗口。
#==============================================================================
class Window_Head < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(0, 320, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@a = Sprite.new
@a.x = self.x + 20 ; @a.y = self.y + 20 ; @a.z = self.z + 1
@a.zoom_x = @a.zoom_y = 0.5
refresh
end
def dispose
super
@a.dispose if !@a.nil?
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if $scene.active_battler.nil?
@a.bitmap = Bitmap.new("Graphics/Heads/head_#{$game_party.actors[0].id}")
else
@a.bitmap = Bitmap.new("Graphics/Heads/head_#{$scene.active_battler.id}")
end
end
end
#==============================================================================
# ■ Window_Head
#------------------------------------------------------------------------------
# 显示敌人头像的窗口。
#==============================================================================
class Window_Head2 < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(480, 320, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@a = Sprite.new
@a.x = self.x + 20 ; @a.y = self.y + 20 ; @a.z = self.z + 1
@a.zoom_x = @a.zoom_y = 0.5
refresh
end
def dispose
super
@a.dispose if !@a.nil?
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if $scene.active_battler.nil?
@a.bitmap = Bitmap.new("Graphics/Heads/head2_#{$game_troop.enemies[0].id}")
else
@a.bitmap = Bitmap.new("Graphics/Heads/head2_#{$scene.active_battler.id}")
end
end
end
|