| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 0 |
| 经验 | |
| 最后登录 | 2016-9-4 |
| 在线时间 | 331 小时 |
- 梦石
- 0
- 星屑
- 48
- 在线时间
- 331 小时
- 注册时间
- 2012-5-4
- 回帖
- 117
|
发表于 2013-4-3 22:40:07
|
显示全部楼层
这里有一个,立绘半身像都行。
先是:
- #==============================================================================
- # ■ 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
复制代码
试试吧。 |
|