加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
#============================================================================== # ■ Window_Images #------------------------------------------------------------------------------ # 人物半身像。 #============================================================================== class Window_Images < Window_Base attr_reader :actor def actor return @actor end def actor=(actor) @actor = actor end #-------------------------------------------------------------------------- # ● 初始化对像 # actor : 角色 #-------------------------------------------------------------------------- def initialize(actor = $game_party.actors[0]) @actor = actor @back = Sprite.new super(origin_x,origin_y,965,535) self.z = 20 self.opacity = 0 refresh end #-------------------------------------------------------------------------- # ● 活动窗口用原始x y坐标 #-------------------------------------------------------------------------- def origin_x return 235 end def origin_y return 105 end #-------------------------------------------------------------------------- # ● 一些方法的重载 #-------------------------------------------------------------------------- def dispose @back.dispose super end def x=(x) super(x) @back.x = x+240 end def y=(y) super(y) @back.y = y-105 end def z=(z) super(z) @back.z=z-5 end def visible=(visible) super(visible) @back.visible=visible end def contents_opacity=(opacity) @back.opacity = opacity super(opacity) end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh(actor=@actor) @actor = actor @back.bitmap = RPG::Cache.images(@actor.name)#这是立绘部分 @back.opacity = 500 end end
#==============================================================================
# ■ Window_Images
#------------------------------------------------------------------------------
# 人物半身像。
#==============================================================================
class Window_Images < Window_Base
attr_reader :actor
def actor
return @actor
end
def actor=(actor)
@actor = actor
end
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor = $game_party.actors[0])
@actor = actor
@back = Sprite.new
super(origin_x,origin_y,965,535)
self.z = 20
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● 活动窗口用原始x y坐标
#--------------------------------------------------------------------------
def origin_x
return 235
end
def origin_y
return 105
end
#--------------------------------------------------------------------------
# ● 一些方法的重载
#--------------------------------------------------------------------------
def dispose
@back.dispose
super
end
def x=(x)
super(x)
@back.x = x+240
end
def y=(y)
super(y)
@back.y = y-105
end
def z=(z)
super(z)
@back.z=z-5
end
def visible=(visible)
super(visible)
@back.visible=visible
end
def contents_opacity=(opacity)
@back.opacity = opacity
super(opacity)
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh(actor=@actor)
@actor = actor
@back.bitmap = RPG::Cache.images(@actor.name)#这是立绘部分
@back.opacity = 500
end
end
|