#-------------------------------------------------------------------------- # ● 绘制角色立绘 #-------------------------------------------------------------------------- def draw_player #自动提取角色档名,以 player_ 开头,后面是三位数的角色 id 值,例如 player_005.png 是 id 为 005 的角色 player_filename = sprintf("player_%02d.png", @actor.id) #检查是否角色档名存在,若不存在则跳出不描绘 return unless FileTest.exist?("Graphics/Party/" + player_filename) #读取角色档内容至位图 bitmap = Cache.load_bitmap("Graphics/Party/", player_filename) #划定位图显示区域矩形范围 rect = Rect.new(0, 0, bitmap.width, bitmap.height) #描绘位图到画面上 contents.blt(contents_width - bitmap.width, contents_height - bitmap.height, bitmap, rect, 255) #完成后将位图清除 bitmap.dispose end
j433463 发表于 2013-3-30 00:22
菜单栏显示半身像,可以试试加上这个:
#------------------------------------------------------------- ...
未命名.jpg (15.02 KB, 下载次数: 48)
j433463 发表于 2013-3-30 09:38
可能是 javascript 被浏览器禁用,像是我的 firefox 有用到 noscript,必须把 66rpg 的网域设为允许,点复 ...
draw_player
#============================================================================== # ■ VXAce-RGSS3-14 立ち絵ステータス [Ver1.0.0] by Claimh #------------------------------------------------------------------------------ # ステータス画面に立ち絵を追加します #------------------------------------------------------------------------------ # 立ち絵は Graphics/Pictures 以下の # Actor{アクターID} を表示します(アクター1 : Actor1.png) #------------------------------------------------------------------------------ # ●立ち絵の変更 # $game_actors[アクターID].picture = "ファイル名" #============================================================================== #============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # ● アクターの立ち絵描画 #-------------------------------------------------------------------------- def draw_actor_picture(actor, x, y, enabled = true) bitmap = Cache.picture(actor.picture) rect = Rect.new(0, 0, bitmap.width, bitmap.height) contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha) bitmap.dispose end end #============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :picture # 立ち絵(277x288) #-------------------------------------------------------------------------- # ● セットアップ #-------------------------------------------------------------------------- alias setup_picture setup def setup(actor_id) setup_picture(actor_id) @picture = "Actor#{actor_id}" end end #============================================================================== # ■ Window_Status #============================================================================== class Window_Status < Window_Selectable #-------------------------------------------------------------------------- # ● ブロック 1 の描画 #-------------------------------------------------------------------------- alias draw_block1_picture draw_block1 def draw_block1(y) draw_actor_picture(@actor, 0, contents_height-480, false) draw_block1_picture(y) end end
#============================================================================== # ■ VXAce-RGSS3-14 立ち絵ステータス(2ページ目) [Ver1.0.0] by Claimh #------------------------------------------------------------------------------ # ステータス画面に2ページ目を追加します。 # 2ページ目にはスキルリストを表示します。 #============================================================================== #============================================================================== # ■ Window_Status #============================================================================== class Window_Status < Window_Selectable MAX_PAGE = 2 # 最大ページ数 #-------------------------------------------------------------------------- # ● リフレッシュ(1ページ目) #-------------------------------------------------------------------------- alias refresh_picst refresh def refresh @page = 0 refresh_picst end #-------------------------------------------------------------------------- # ● 次のページへ #-------------------------------------------------------------------------- def next_page case ((@page + 1) % MAX_PAGE) when 0; refresh when 1; refresh2 end end #-------------------------------------------------------------------------- # ● リフレッシュ(2ページ目) #-------------------------------------------------------------------------- def refresh2 @page = 1 contents.clear draw_actor_picture(@actor, 0, contents_height-350) draw_block1_picture(line_height * 0) draw_horz_line (line_height * 1) draw_page2_block2 (line_height * 2) end #-------------------------------------------------------------------------- # ● 2ページ目 block2 (スキルリスト) #-------------------------------------------------------------------------- def draw_page2_block2(y) max = (contents_height - y) / line_height @actor.skills.each_index do |i| yy = y + i * line_height return if max >= yy draw_item_name(@actor.skills[i], 288, yy) end end end #============================================================================== # ■ Scene_Status #============================================================================== class Scene_Status < Scene_MenuBase #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- alias start_picst start def start start_picst @status_window.set_handler(:ok, method(:next_page)) end #-------------------------------------------------------------------------- # ● 次のページへ #-------------------------------------------------------------------------- def next_page @status_window.next_page @status_window.activate end end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |