#============================================================================== # ■ 战斗精简头像显示 BY #------------------------------------------------------------------------------ # 这个比《黑狮子纹章》的方法简单且不同准备多余素材 #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # ● 绘制战斗状态头像 # face_name : 头像文件名 # face_index : 头像号码 # x : 描画目标 X 坐标 # y : 描画目标 Y 坐标 # size : 显示大小 #-------------------------------------------------------------------------- def draw_status_face(face_name, face_index, x, y, size = 96) bitmap = Cache.face(face_name) rect = Rect.new(0, 0, 0, 0) rect.x = face_index % 4 * 96 + (96 - size) / 2 rect.y = face_index / 4 * 96 + (96 - size) / 2 + 30 rect.width = 96 rect.height = 32 self.contents.blt(x, y, bitmap, rect) bitmap.dispose end #-------------------------------------------------------------------------- # ● 绘制战斗状态头像 # actor : 角色 # x : 描画目标 X 坐标 # y : 描画目标 Y 坐标 # size : 绘制大小 #-------------------------------------------------------------------------- def draw_statu_face(actor, x, y) draw_status_face(actor.face_name, actor.face_index, x, y) end end class Window_BattleStatus < Window_Selectable #-------------------------------------------------------------------------- # ● 描绘项目 # index : 项目索引 #-------------------------------------------------------------------------- alias draw_face_item draw_item def draw_item(index) draw_face_item(index) rect = item_rect(index) actor = $game_party.members[index] draw_statu_face(actor, 64, rect.y) #坐标自己改 end end
战斗头像01.jpg (55.78 KB, 下载次数: 14)
图一仲秋启明战斗精简头像显示
战斗头像02.jpg (65.78 KB, 下载次数: 16)
图二我的想法
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |