赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 569 |
最后登录 | 2012-7-13 |
在线时间 | 7 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 7 小时
- 注册时间
- 2009-1-1
- 帖子
- 263
|
本帖最后由 柳飛鷹 于 2009-8-20 13:47 编辑
- #==============================================================================
- # ■ Window_EquipLeft
- #------------------------------------------------------------------------------
- # 装备画面的、显示角色能力值变化的窗口。
- #==============================================================================
- class Window_EquipLeft < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(0, 64, 272, 416)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_actor_name(@actor, 4, 0)
- draw_actor_level(@actor, 4, 32)
- draw_actor_parameter(@actor, 4, 64, 0)
- draw_actor_parameter(@actor, 4, 96, 1)
- draw_actor_parameter(@actor, 4, 128, 2)
- draw_actor_parameter(@actor, 4, 160, 7)
- draw_actor_parameter(@actor, 4, 192, 3)
- draw_actor_parameter(@actor, 4, 224, 4)
- draw_actor_parameter(@actor, 4, 256, 5)
- draw_actor_parameter(@actor, 4, 288, 6)
- if @new_atk != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 64, 40, 32, "→", 1)
- self.contents.font.color = @new_atk>@actor.atk ? up_color : down_color
- self.contents.font.color = normal_color if @new_atk == @actor.atk
- self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
- end
- if @new_pdef != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 96, 40, 32, "→", 1)
- self.contents.font.color = @new_pdef>@actor.pdef ? up_color : down_color
- self.contents.font.color = normal_color if @new_pdef == @actor.pdef
- self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
- end
- if @new_mdef != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 128, 40, 32, "→", 1)
- self.contents.font.color = @new_mdef>@actor.mdef ? up_color : down_color
- self.contents.font.color = normal_color if @new_mdef == @actor.mdef
- self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
- end
- if @new_eva != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 160, 40, 32, "→", 1)
- self.contents.font.color = @new_eva>@actor.eva ? up_color : down_color
- self.contents.font.color = normal_color if @new_eva == @actor.eva
- self.contents.draw_text(200, 160, 36, 32, @new_eva.to_s, 2)
- end
- if @new_str != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 192, 40, 32, "→", 1)
- self.contents.font.color = @new_str>@actor.str ? up_color : down_color
- self.contents.font.color = normal_color if @new_str == @actor.str
- self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
- end
- if @new_dex != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 224, 40, 32, "→", 1)
- self.contents.font.color = @new_dex>@actor.dex ? up_color : down_color
- self.contents.font.color = normal_color if @new_dex == @actor.dex
- self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
- end
- if @new_agi != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 256, 40, 32, "→", 1)
- self.contents.font.color = @new_agi>@actor.agi ? up_color : down_color
- self.contents.font.color = normal_color if @new_agi == @actor.agi
- self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
- end
- if @new_int != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 288, 40, 32, "→", 1)
- self.contents.font.color = @new_int>@actor.int ? up_color : down_color
- self.contents.font.color = normal_color if @new_int == @actor.int
- self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
- end
- end
- #--------------------------------------------------------------------------
- # ● 变更装备后的能力值设置
- # new_atk : 变更装备后的攻击力
- # new_pdef : 变更装备后的物理防御
- # new_mdef : 变更装备后的魔法防御
- #--------------------------------------------------------------------------
- def set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
- if @new_atk != new_atk or @new_pdef !=new_pdef or @new_mdef != new_mdef or @new_eva != new_eva or @new_str != new_str or @new_dex !=new_dex or @new_agi != new_agi or @new_int != new_int
- @new_atk = new_atk
- @new_pdef = new_pdef
- @new_mdef = new_mdef
- @new_eva = new_eva
- @new_str = new_str
- @new_dex = new_dex
- @new_agi = new_agi
- @new_int = new_int
- refresh
- end
- end
- end
复制代码 OK |
|