赞 | 1 |
VIP | 255 |
好人卡 | 52 |
积分 | 1 |
经验 | 77416 |
最后登录 | 2016-1-18 |
在线时间 | 1269 小时 |
Lv1.梦旅人 薄凉看客
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1269 小时
- 注册时间
- 2010-6-20
- 帖子
- 1316
|
@actor @hp @sp @exp @next_exp @x @y- #==============================================================================
- # ■ Window_EquipLeft
- #------------------------------------------------------------------------------
- # 装备画面的、显示角色能力值变化的窗口。
- #==============================================================================
- #--------------------------------------#
- # 大话西游单机论坛 www.ie886.com #
- #--------------------------------------#
- class Window_EquipLeft < Window_Base
- #===================释放经验条====================
- def dispose
- super
- dispose_exp
- end
- #=====================================================================
- def dispose_exp
- #◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
- if !@exp_b.nil? and !@exp_b.disposed?
- @exp_b.bitmap.dispose
- @exp_b.dispose
- @exp_b = nil
- @exp_c.bitmap.dispose
- @exp_c.dispose
- @exp_c = nil
- end
- end
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
-
- super(0, 0, 640, 480) #super(0, 64, 272, 192)
-
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
-
- if $scene.is_a?(Scene_Baby)
- self.x = 0
- self.y = 0
- self.width = 640
- self.height = 480
- end
-
- if $scene.is_a?(Scene_Baby) and @actor != 0
- refresh2
- elsif @actor != 0
- refresh
- end
- end
- #--------------------------------------------------------------------------
- # ● 宠物加点---KDS添加
- #--------------------------------------------------------------------------
- def refresh2
-
- draw_actor_name(@actor, 46+100, 144)
-
- @actor = $baby_index
-
- self.contents.clear
-
- if $stop == 0
- return
- end
-
- self.contents.font.size = 15
- self.contents.font.bold = true
- draw_actor_name(@actor, 46, 144) # 名字
- draw_actor_level2(@actor, 46, 166) # 等级
- self.contents.draw_text(46, 190, 50, 32, "100") #忠诚
- draw_actor_parameter2(@actor, - 27, 274, 3) # 力量
- draw_actor_parameter2(@actor, - 27, 300, 4) # SP敏捷
-
- draw_actor_parameter2(@actor, 246, 225, 8) # 根骨
- draw_actor_parameter2(@actor, 246, 249, 9) # 灵性
- draw_actor_parameter2(@actor, 246, 275, 10) # 力量
- draw_actor_parameter2(@actor, 246, 300, 11) # 敏捷
-
- draw_actor_parameter2(@actor, 284, 324, 7) # 点数
-
- self.contents.font.color = Color.new(255,255,255)
- self.contents.draw_text(44, 225, 300, 32, @actor.hp.to_s + "/" + @actor.maxhp.to_s)
- self.contents.draw_text(44, 249, 300, 32, @actor.sp.to_s + "/" + @actor.maxsp.to_s)
- self.contents.draw_text(44, 325, 300, 32, @actor.exp_s + "/" + @actor.next_exp_s)
- #======================================================================
- self.contents.font.size = 15
- self.contents.draw_text(270, 225, 80, 32, "根骨", 0)
- self.contents.draw_text(270, 249, 80, 32, "灵性", 0)
- self.contents.draw_text(270, 275, 80, 32, "力量", 0)
- # self.contents.draw_text(280, 300, 80, 32, "罡力", 0)
- self.contents.draw_text(270, 300, 80, 32, "敏捷", 0)
- #=======================================================================
- #===============经验条显示==============================================
- #◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
- dispose_exp
- @exp_b = nil
- @exp_c = nil
- @exp_b = Sprite.new
- @exp_c = Sprite.new
- #=================图片显示============
- @exp_b.bitmap = Bitmap.new(168,10) #(经验条1宽度,第高度)
- @exp_c.bitmap = Bitmap.new(168,5) #(经验条2宽度,第高度)
- #=================经验条颜色============
- color2 = Color.new(111,172,115,255) #经验条1颜色
- color3 = Color.new(49,159,51,255) #经验条2颜色
- #=================经验值增幅度===============
- #★★★★★★★★★★★★★★★★★★★★
- next_exp = @actor.next_exp_s.to_i == 0 ? @actor.exp : @actor.next_exp_s.to_i
- @exp_d = 168*@actor.exp/next_exp
- #=================经验条增幅条1==============
- @exp_b.x = 61+310
- @exp_b.y = 250+50-1
- @exp_b.z = 10001
- @exp_b.bitmap.fill_rect(0,0,@exp_d,32,color2)
- #=================经验条增幅条2==============
- @exp_c.x = 61+310
- @exp_c.y = 253+50-1
- @exp_c.z = 10001
- @exp_c.bitmap.fill_rect(0,0,@exp_d,32,color3)
- # end
- 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)
-
- if @new_atk != nil
- self.contents.font.color = system_color
- self.contents.draw_text(160, 64, 40, 32, "→", 1)
- self.contents.font.color = normal_color
- 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 = normal_color
- 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 = normal_color
- self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
- end
-
- end
- #--------------------------------------------------------------------------
- # ● 变更装备后的能力值设置
- # new_atk : 变更装备后的攻击力
- # new_pdef : 变更装备后的物理防御
- # new_mdef : 变更装备后的魔法防御
- #--------------------------------------------------------------------------
- def set_new_parameters(new_atk, new_pdef, new_mdef)
- if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
- @new_atk = new_atk
- @new_pdef = new_pdef
- @new_mdef = new_mdef
- refresh
- end
- end
- end
- #--------------------------------------#
- # 大话西游单机论坛 www.ie886.com #
- #--------------------------------------#
复制代码 这样就好了 |
评分
-
查看全部评分
|