赞 | 0 |
VIP | 187 |
好人卡 | 12 |
积分 | 1 |
经验 | 6042 |
最后登录 | 2012-10-8 |
在线时间 | 333 小时 |
Lv1.梦旅人 穿越一季:朔
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 333 小时
- 注册时间
- 2007-4-11
- 帖子
- 5369

|
- #==============================================================================
- # 显示头像的战斗信息框 by 沉影不器
- #------------------------------------------------------------------------------
- # 功能: 给战斗信息框添加头像显示
- #
- # 由于敌人没有头像,目前vx素材又少,用战斗图装凑合着显示
- # 超过96*96的战斗图,取战斗图顶部居中的96*96方框图像
- #==============================================================================
- #==============================================================================
- # ■ Scene_Battle
- #------------------------------------------------------------------------------
- # 处理战斗画面的类。
- #==============================================================================
- class Scene_Battle < Scene_Base
- attr_reader :active_battler
- end
- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # 游戏中全部窗口的超级类。
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● 描绘敌人脸谱图像
- #--------------------------------------------------------------------------
- def draw_enemy_face(actor, x, y, size = 96)
- draw_battler(actor.battler_name, actor.battler_hue, x, y, size)
- end
- #--------------------------------------------------------------------------
- # ● 描绘战斗图
- #--------------------------------------------------------------------------
- def draw_battler(battler_name, battler_hue, x, y, size = 96)
- @battler_name = battler_name
- @battler_hue = battler_hue
- bitmap = Cache.battler(@battler_name, @battler_hue).clone
- rect = Rect.new(0, 0, 0, 0)
- rect.x = [bitmap.width/2 - 48, 0].max
- rect.width = size
- rect.height = size
- self.contents.blt(x, y, bitmap, rect)
- bitmap.dispose
- end
- end
- #==============================================================================
- # ■ Window_BattleMessage
- #------------------------------------------------------------------------------
- # 在战斗中显示消息的窗口。附加有普通消息窗口的功能、显示战斗进行中提示的
- # 的机能。
- #==============================================================================
- class Window_BattleMessage < Window_Message
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- for i in [email protected]
- draw_line(i)
- end
- return unless $scene.is_a?(Scene_Battle)
- if $scene.active_battler != nil
- battler = $scene.active_battler
- if battler.is_a?(Game_Enemy)
- draw_enemy_face($scene.active_battler, 0, 0, 96)
- else
- draw_actor_face($scene.active_battler, 0, 0, 96)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘行
- # index : 行编号
- #--------------------------------------------------------------------------
- def draw_line(index)
- rect = Rect.new(0, 0, 0, 0)
- rect.x += 4 + 96
- rect.y += index * WLH
- rect.width = contents.width - 8
- rect.height = WLH
- self.contents.clear_rect(rect)
- self.contents.font.color = normal_color
- self.contents.draw_text(rect, @lines[index])
- end
- end
复制代码
符合你所有要求 系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~ |
|