赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 29377 |
最后登录 | 2013-8-7 |
在线时间 | 1 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1 小时
- 注册时间
- 2008-8-3
- 帖子
- 976
|
汗,没看到范例工程脚本里面,MAIN下面备用了逃跑选项吗?把那个剪切到MAIN上面就可以了
- #===================================================================
- #★选项前显示相应图标 & 增加逃跑选项
- #-------------------------------------------------------------------
- #★作者 : Zhong_zw
- #★效果思路照自 : 柳柳 《美化战斗命令选项》
- #====================================================================
- #==============================================================================
- # ■ Window_ActorCommand
- #------------------------------------------------------------------------------
- # バトル画面で、戦うか逃げるかを選択するウィンドウです。
- #==============================================================================
- class Window_ActorCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(128, [], 1, 4)
- self.active = false
- @icon_name = ["攻击_icon","特技_icon","防御_icon","物品_icon","逃跑_icon"]
-
- end
- #--------------------------------------------------------------------------
- # ● セットアップ
- # actor : アクター
- #--------------------------------------------------------------------------
- def setup(actor)
- s1 = Vocab::attack
- s2 = Vocab::skill
- s3 = Vocab::guard
- s4 = Vocab::item
- s5 = Vocab::escape
- @actor = actor
- if actor.class.skill_name_valid # スキルのコマンド名が有効?
- s2 = actor.class.skill_name # コマンド名を置き換える
- end
- self.cursor_rect.height = self.cursor_rect.height + 2
- @commands = [s1, s2, s3, s4,s5]
- draw_item(4, $game_troop.can_escape)
- @item_max = 5
-
- refresh
- self.index = 0
- end
- def create_contents
- self.contents.dispose
-
- self.contents = Bitmap.new(width - 32, [height+WLH - 32, (row_max+1) * WLH].max)
-
- end
-
- def update
- super
-
- s1 = Vocab::attack
- s2 = Vocab::skill
- s3 = Vocab::guard
- s4 = Vocab::item
- s5 = Vocab::escape
- if @actor != nil and @actor.class.skill_name_valid # スキルのコマンド名が有効?
- s2 = @actor.class.skill_name # コマンド名を置き換える
- end
-
- @commands = [s1, s2, s3, s4,s5]
- draw_item(4, $game_troop.can_escape)
- @item_max = 5
- refresh
- bitmap = Bitmap.new("Graphics/system/#{@icon_name[self.index]}")
- y = 2 + self.index * 24
- self.contents.blt(3,y,bitmap,bitmap.rect)
-
-
-
- end
- def draw_item(index, enabled = true)
- rect = item_rect(index)
- if self.index == index
- rect.x += 24
- else
- rect.x += 4
- end
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.font.color = normal_color
- self.contents.font.color.alpha = enabled ? 255 : 128
- self.contents.draw_text(rect, @commands[index])
- end
-
- end
复制代码 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|