| 赞 | 1  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 7 | 
 
| 经验 | 5305 | 
 
| 最后登录 | 2024-6-15 | 
 
| 在线时间 | 218 小时 | 
 
 
 
 
 
Lv2.观梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 686 
 
        - 在线时间
 - 218 小时
 
        - 注册时间
 - 2016-5-10
 
        - 帖子
 - 99
 
 
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
 
 
使用了:战斗全动态HP,MP,TP(Battle_H.M.T) 
脚本打上后是成功了,可是字母和数字位置和字体需要调整。 
请问在哪里可以调整字母和数字显示的位置。 
求大神帮助。 
另:求血条 蓝条的颜色修改方法,我想把血条弄成绿色或者红色的,不想要橙色的。 
下面上代码: 
- # -----------------------------------------------------------------------------
 
 - # ◆战斗全动态HP,MP,TP(Battle_H.M.T) By.Clov
 
 - # -----------------------------------------------------------------------------
 
 - # Ver:1.0.0 Date:2012.04.08
 
 - # -1.0.0:基本版
 
 - # Ver:1.0.1 Date:2012.04.09
 
 - # -1.0.1:修正逃跑返回不显示问题
 
 - # -----------------------------------------------------------------------------
 
 - #==============================================================================
 
 - # ■ Window_BattleStatus
 
 - #------------------------------------------------------------------------------
 
 - #  战斗画面中,显示[队伍成员状态的窗口。
 
 - #==============================================================================
 
  
- class Window_BattleStatus < Window_Selectable
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 初始化
 
 -   #--------------------------------------------------------------------------
 
 -   def initialize
 
 -     super(0, 0, window_width, window_height)
 
 -     new_hmt unless self.is_a?(Window_BattleActor)
 
 -     refresh
 
 -     self.openness = 0
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◆ 生成新的动态插槽
 
 -   #--------------------------------------------------------------------------
 
 -   def new_hmt
 
 -     hp1 = Color.new(225, 128, 64, 255)
 
 -     hp2 = Color.new(225, 192, 64, 255)
 
 -     mp1 = Color.new(64, 128, 192, 255)
 
 -     mp2 = Color.new(64, 192, 240, 255)
 
 -     tp1 = Color.new(36, 5, 79, 255)
 
 -     tp2 = Color.new(231, 90, 145, 255)
 
 -     @actor_hp = [];@actor_mp = [];@actor_tp = []
 
 -     if $data_system.opt_display_tp
 
 -       x = 305;y = 320;w = 66;w2 = 6;h = 10;wx = 76;hx = 24;i = 0
 
 -     else
 
 -       x = 305;y = 320;w = 77;w2 = 54;h = 10;wx = 90;hx = 24;i = 0
 
 -     end
 
 -     $game_party.battle_members.each {|actor|
 
 -       if $data_system.opt_display_tp
 
 -         @actor_tp[i] = DynamicSlot.new(x+wx*2+w2,y+i*hx,150,w,h,tp1,tp2,:UD,false)
 
 -         @actor_tp[i].slot_dynamic_speed(0.2)
 
 -         @actor_tp[i].value_max(100)
 
 -         @actor_tp[i].auto_normal_draw(0)
 
 -         @actor_tp[i].value_set(2,24)
 
 -         @actor_tp[i].value_xy(x+wx*2+w2-w,y+i*hx-10)
 
 -       end
 
 -       @actor_mp[i] = DynamicSlot.new(x+wx+w2,y+i*hx,150,w,h,mp1,mp2,:LR,false)
 
 -       @actor_mp[i].value_max(actor.mmp)
 
 -       @actor_mp[i].auto_normal_draw(actor.mp)
 
 -       @actor_mp[i].value_set(2,24)
 
 -       @actor_mp[i].value_xy(x+wx+w2-w,y+i*hx-10)
 
 -       free = i == item_max - 1 ? true : false
 
 -       @actor_hp[i] = DynamicSlot.new(x,y+i*hx,150,w+w2,h,hp1,hp2,:LR,free)
 
 -       @actor_hp[i].value_max(actor.mhp)
 
 -       @actor_hp[i].auto_normal_draw(actor.hp)
 
 -       @actor_hp[i].value_set(2,24)
 
 -       @actor_hp[i].value_xy(x-(w+w2),y+i*hx-10)
 
 -     i+=1}
 
 -     for i in 0...item_max
 
 -       @actor_hp[item_max - 1].free_text(x,y+i*hx-12,Vocab::hp_a,0,28,nil,nil,system_color)
 
 -       @actor_hp[item_max - 1].free_text(x+wx+w2,y+i*hx-10,Vocab::mp_a,0,28,nil,nil,system_color)
 
 -       @actor_hp[item_max - 1].free_text(x+wx*2+w2,y+i*hx-10,Vocab::tp_a,0,28,nil,nil,system_color)
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◆ 取得目前动态插槽
 
 -   #--------------------------------------------------------------------------
 
 -   def now_hmt
 
 -     @actor_hp + @actor_mp  + @actor_tp
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◆ 刷新、释放动态插槽
 
 -   #--------------------------------------------------------------------------
 
 -   def update
 
 -     super
 
 -     unless self.is_a?(Window_BattleActor)
 
 -       now_hmt.each{|hmt|hmt.update}
 
 -     end
 
 -   end
 
 -   def dispose
 
 -     super
 
 -     unless self.is_a?(Window_BattleActor)
 
 -       now_hmt.each{|hmt|hmt.dispose}
 
 -    end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 描画项目
 
 -   #--------------------------------------------------------------------------
 
 -   def draw_item(index)
 
 -     actor = $game_party.battle_members[index]
 
 -     draw_basic_area(basic_area_rect(index), actor)
 
 -     unless self.is_a?(Window_BattleActor)
 
 -       @actor_hp[index].auto_gradually_draw(actor.hp)
 
 -       @actor_mp[index].auto_gradually_draw(actor.mp)
 
 -       @actor_tp[index].auto_gradually_draw(actor.tp.to_i) if $data_system.opt_display_tp
 
 -     end
 
 -   end
 
 - end
 
  
- #==============================================================================
 
 - # ■ Scene_Battle
 
 - #------------------------------------------------------------------------------
 
 - #  战斗画面
 
 - #==============================================================================
 
  
- class Scene_Battle < Scene_Base
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 移动信息显示的显示端口
 
 -   #--------------------------------------------------------------------------
 
 -   alias move_info_viewportY move_info_viewport
 
 -   def move_info_viewport(ox)
 
 -     move_info_viewportY(ox)
 
 -     current_ox = @info_viewport.ox
 
 -     @status_window.now_hmt.each {|htm|
 
 -     htm.VIEWPORT.ox = [ox, current_ox + 16].min if current_ox < ox
 
 -     htm.VIEWPORT.ox = [ox, current_ox - 16].max if current_ox > ox }
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 信息窗口打开时的更新
 
 -   #    在状态窗口关闭完成前,信息窗口的打开度设置为 0 。
 
 -   #--------------------------------------------------------------------------
 
 -   alias update_message_openY update_message_open
 
 -   def update_message_open
 
 -     update_message_openY
 
 -     if !$game_message.busy? && @status_window.close? && !@hmt_vis
 
 -       @hmt_vis = true
 
 -       @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = true}
 
 -     end
 
 -     if $game_message.busy? && !@status_window.close? && @hmt_vis
 
 -       @hmt_vis = false
 
 -       @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = false}
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 生成状态窗口
 
 -   #--------------------------------------------------------------------------
 
 -   alias create_status_windowY create_status_window
 
 -   def create_status_window
 
 -     create_status_windowY
 
 -     @hmt_vis = false
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = false}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 开始选择队友
 
 -   #--------------------------------------------------------------------------
 
 -   alias select_actor_selectionY select_actor_selection
 
 -   def select_actor_selection
 
 -     select_actor_selectionY
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = false}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 角色[决定]
 
 -   #--------------------------------------------------------------------------
 
 -   alias on_actor_okY on_actor_ok
 
 -   def on_actor_ok
 
 -     on_actor_okY
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = true}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 角色[取消]
 
 -   #--------------------------------------------------------------------------
 
 -   alias on_actor_cancelY on_actor_cancel
 
 -   def on_actor_cancel
 
 -     on_actor_cancelY
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = true}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 开始选择敌人
 
 -   #--------------------------------------------------------------------------
 
 -   alias select_enemy_selectionY select_enemy_selection
 
 -   def select_enemy_selection
 
 -     select_enemy_selectionY
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = false}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 敌方[决定]
 
 -   #--------------------------------------------------------------------------
 
 -   alias on_enemy_okY on_enemy_ok
 
 -   def on_enemy_ok
 
 -     on_enemy_okY
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = true}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 敌方[取消]
 
 -   #--------------------------------------------------------------------------
 
 -   alias on_enemy_cancelY on_enemy_cancel
 
 -   def on_enemy_cancel
 
 -     on_enemy_cancelY
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = true}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 战斗开始
 
 -   #--------------------------------------------------------------------------
 
 -   alias battle_startY battle_start
 
 -   def battle_start
 
 -     battle_startY
 
 -     @status_window.now_hmt.each {|hmt|hmt.VIEWPORT.visible = true}
 
 -   end
 
 - end
 
  复制代码- # -----------------------------------------------------------------------------
 
 - # ◆全动态插槽(DynamicSlot) By.Clov
 
 - # -----------------------------------------------------------------------------
 
 - # Ver:1.0.0 Date:2012.02.02
 
 - # -16个零件完成
 
 - # -23个插件完成
 
 - # -----------------------------------------------------------------------------
 
 - # ◆Script<DynamicSlot>
 
 - # -----------------------------------------------------------------------------
 
 - # TYPE:组件 ID:01
 
 - # -----------------------------------------------------------------------------
 
 - class DynamicSlot
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:设置
 
 -   #--------------------------------------------------------------------------
 
 -   #边框大小
 
 -   FRAME_SIZE = 0
 
 -   #边框颜色
 
 -   FRAME_COLOR = Color.new(255, 255, 255, 255)
 
 -   #背景颜色1
 
 -   BACK_COLOR1 = Color.new(0, 0, 0, 255)
 
 -   #背景颜色2
 
 -   BACK_COLOR2 = Color.new(0, 0, 0, 128)
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:01
 
 -   #--------------------------------------------------------------------------
 
 -   def initialize(x, y, z, width, height, color1, color2, type = :LR,
 
 -     free_sprite = true, value_sprite = true)
 
 -     @x = x                                         # 精灵x坐标
 
 -     @y = y                                         # 精灵y坐标
 
 -     @z = z                                         # 视窗z坐标
 
 -     @width = width                                 # 精灵宽
 
 -     [url=home.php?mod=space&uid=291977]@height[/url] = height                               # 精灵高
 
 -     @width2 = width * 2                            # 精灵宽*2
 
 -     @height2 = height * 2                          # 精灵高*2
 
 -     @free_sprite = free_sprite                     # 自由精灵是否存在
 
 -     @value_sprite = value_sprite                   # 数值精灵是否存在
 
 -     @slot_color1 = color1                          # 插槽颜色1
 
 -     @slot_color2 = color2                          # 插槽颜色2
 
 -     @slot_type = type                              # 插槽类型
 
 -     @slot_width = width                            # 插槽的宽
 
 -     @slot_opacity = 255                            # 插槽的不透明度
 
 -     @slot_move_count = 0                           # 插槽移动计数
 
 -     @slot_dynamic = true                           # 插槽动态开关
 
 -     @slot_dynamic_speed = 1                        # 插槽动态速度
 
 -     @slot_gradually = false                        # 插槽开始渐增减开关
 
 -     @slot_gradually_speed = 1                      # 插槽渐增减速度
 
 -     @slot_gradually_width = 0                      # 插槽渐增减宽度
 
 -     @slot_gradually_value = true                   # 插槽渐增减动态数值开关
 
 -     @slot_flash = false                            # 插槽颜色闪烁开关
 
 -     @slot_flash_count = 0                          # 插槽颜色闪烁计数
 
 -     @slot_flash_time = 40                          # 插槽颜色闪烁帧
 
 -     @slot_flash_color = Color.new(0,0,0,0)         # 插槽颜色闪烁颜色
 
 -     @slot_fade = false                             # 插槽透明闪烁(渐现)开关
 
 -     @slot_fade_show = 5                            # 插槽透明闪烁(渐现)帧渐现值
 
 -     #视窗>背景>插槽>边框>数值>自由绘制
 
 -     viewport;back;slot;frame;value if value_sprite;free if free_sprite
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:02
 
 -   #--------------------------------------------------------------------------
 
 -   def viewport
 
 -     @vw = (defined? Graphics.width) ? Graphics.width : 640
 
 -     @vh = (defined? Graphics.height) ? Graphics.height : 480
 
 -     @viewport = Viewport.new(0,0,@vw,@vh);@viewport.z = @z
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:03
 
 -   #--------------------------------------------------------------------------
 
 -   def back
 
 -     @back = Sprite.new(@viewport)
 
 -     @back.x = @x;@back.y = @y;@back.z = 0
 
 -     @back.bitmap = Bitmap.new(@width, @height)
 
 -     @back.bitmap.GFR(0, 0, @width, @height, BACK_COLOR1, BACK_COLOR2)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:04
 
 -   #--------------------------------------------------------------------------
 
 -   def slot
 
 -     @slot = Sprite.new(@viewport)
 
 -     @slot.x = @x;@slot.y = @y;@slot.z = 1;@slot.opacity = @slot_opacity
 
 -     case @slot_type;when:LR;solt_draw_lr;when:UD;solt_draw_ud;end
 
 -     @slot_update = "slot_#{@slot_type.to_s.downcase}_update"
 
 -   end
 
 -   def solt_draw_lr
 
 -     @slot.bitmap = Bitmap.new(@width*3, @height)
 
 -     @slot.src_rect.set(0,0,@slot_width,@height)
 
 -     @slot.bitmap.GFR(0, 0, @width, @height, @slot_color1, @slot_color2)
 
 -     @slot.bitmap.GFR(@width, 0, @width, @height, @slot_color2, @slot_color1)
 
 -     @slot.bitmap.GFR(@width*2, 0, @width, @height, @slot_color1, @slot_color2)
 
 -   end
 
 -   def solt_draw_ud
 
 -     @slot.bitmap = Bitmap.new(@width, @height*3)
 
 -     @slot.src_rect.set(0,0,@slot_width,@height)
 
 -     @slot.bitmap.GFR(0, 0, @width, @height, @slot_color1, @slot_color2, true)
 
 -     @slot.bitmap.GFR(0, @height, @width, @height, @slot_color2, @slot_color1, true)
 
 -     @slot.bitmap.GFR(0, @height*2, @width, @height, @slot_color1, @slot_color2, true)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:05
 
 -   #--------------------------------------------------------------------------
 
 -   def frame
 
 -     @frame = Sprite.new(@viewport)
 
 -     @frame.x = @x-FRAME_SIZE;@frame.y = @y-FRAME_SIZE;@frame.z = 2
 
 -     @frame.bitmap = Bitmap.new(@width+FRAME_SIZE*2, @height+FRAME_SIZE*2)
 
 -     @frame.bitmap.fill_rect(0, 0, FRAME_SIZE, @height+FRAME_SIZE*2, FRAME_COLOR)
 
 -     @frame.bitmap.fill_rect(@width+FRAME_SIZE, 0, FRAME_SIZE, @height+FRAME_SIZE*2, FRAME_COLOR)
 
 -     @frame.bitmap.fill_rect(FRAME_SIZE, 0, @width, FRAME_SIZE, FRAME_COLOR)
 
 -     @frame.bitmap.fill_rect(FRAME_SIZE, @height+FRAME_SIZE, @width, FRAME_SIZE, FRAME_COLOR)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:06
 
 -   #--------------------------------------------------------------------------
 
 -   def free
 
 -     @free = Sprite.new(@viewport)
 
 -     @free.x = 0;@free.y = 0;@free.z = 3
 
 -     @free.bitmap = Bitmap.new(@vw, @vh)
 
 -   end
 
 -   def free_text(x,y,t,align=0,size=22,bold=nil,italic=nil,color=nil,name=nil)
 
 -     @free.bitmap.font.size = size
 
 -     @free.bitmap.font.bold = bold if bold != nil
 
 -     @free.bitmap.font.italic = italic if italic != nil
 
 -     @free.bitmap.font.color = color if color
 
 -     @free.bitmap.font.name = name if name
 
 -     @free.bitmap.draw_text(x, y, @vw, size, t, align)
 
 -   end
 
 -   def free_picture(x,y,o,file)
 
 -     bitmap = Bitmap.new(file)
 
 -     rect =  Rect.new(0, 0, bitmap.width, bitmap.height)
 
 -     @free.bitmap.blt(x, y, bitmap, rect, o)
 
 -   end
 
 -   def free_clear
 
 -     @free.bitmap.clear
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:07
 
 -   #--------------------------------------------------------------------------
 
 -   def value
 
 -     @value = Sprite.new(@viewport)
 
 -     @value.x = @x;@value.y = @y;@value.z = 3
 
 -     @value.bitmap = Bitmap.new(@width2, @height2)
 
 -     value_set
 
 -   end
 
 -   def value_xy(*xy)
 
 -     @value.x,@value.y = *xy
 
 -   end
 
 -   def value_draw(num)
 
 -     @value.bitmap.clear
 
 -     @value.bitmap.draw_text(0,0,@width2,@value_size,num.to_s,@value_align)
 
 -   end
 
 -   def value_set(align=0,size=22,bold=nil,italic=nil,color=nil,name=nil)
 
 -     @value_align = align
 
 -     @value_size = size
 
 -     @value.bitmap.font.size = size
 
 -     @value.bitmap.font.bold = bold if bold != nil
 
 -     @value.bitmap.font.italic = italic if italic != nil
 
 -     @value.bitmap.font.color = color if color
 
 -     @value.bitmap.font.name = name if name
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:08
 
 -   #--------------------------------------------------------------------------
 
 -   def value_cur(num)
 
 -     @value_cur = num
 
 -   end
 
 -   def value_max(num)
 
 -     @value_max = num
 
 -     @value_pix = @value_max / @width.to_f * @slot_gradually_speed
 
 -   end
 
 -   def value_now
 
 -     @value_now = (@slot_width / @width.to_f * @value_max).floor
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:09
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_width_set(new_width)
 
 -     @slot.src_rect.width = [[new_width,@width].min,0].max
 
 -     @slot_width = @slot.src_rect.width
 
 -     value_draw(@value_cur) if @value_sprite
 
 -   end
 
 -   def slot_width_push(push_width)
 
 -     slot_width_set(@slot_width+push_width)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:10
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_gradually_set(new_width)
 
 -     @slot_gradually_width = new_width - @slot_width
 
 -     @slot_gradually = true
 
 -     slot_gradually_value_draw  if @value_sprite
 
 -   end
 
 -   def slot_gradually_push(push_width)
 
 -     @slot_gradually_width += push_width
 
 -     @slot_gradually = true
 
 -     slot_gradually_value_draw  if @value_sprite
 
 -   end
 
 -   def slot_gradually_value_draw
 
 -     if @slot_gradually_value
 
 -       @slot_gradually_value_update = true
 
 -       value_now
 
 -     else
 
 -       @slot_gradually_value_update = false
 
 -       value_draw(@value_cur)
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:11
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_gradually_update
 
 -     if @slot_gradually_width != 0
 
 -       if @slot_gradually_width < 0
 
 -         if @slot_width == 0
 
 -           value_draw(@value_cur) if @slot_gradually_value_update
 
 -           @slot_gradually_width = 0
 
 -           @slot_gradually = false
 
 -           return
 
 -         end
 
 -         speed = @slot_gradually_speed + (@slot_gradually_width.abs % @slot_gradually_speed)
 
 -         @slot_gradually_width += speed
 
 -         @slot_width = @slot.src_rect.width -= speed
 
 -         value_draw((@value_now -= @value_pix).truncate) if @slot_gradually_value_update
 
 -       else
 
 -         if @slot_width == @width
 
 -           value_draw(@value_cur) if @slot_gradually_value_update
 
 -           @slot_gradually_width = 0
 
 -           @slot_gradually = false
 
 -           return
 
 -         end
 
 -         speed = @slot_gradually_speed + (@slot_gradually_width % @slot_gradually_speed)
 
 -         @slot_gradually_width -= speed
 
 -         @slot_width = @slot.src_rect.width += speed
 
 -         value_draw((@value_now += @value_pix).truncate) if @slot_gradually_value_update
 
 -       end
 
 -     else
 
 -       value_draw(@value_cur) if @slot_gradually_value_update
 
 -       @slot_gradually = false
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:12
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_lr_update
 
 -     if @slot_move_count < @width2
 
 -       @slot_move_count += @slot_dynamic_speed
 
 -       @slot.src_rect.x = @slot_move_count
 
 -     else
 
 -       @slot_move_count = 0
 
 -       @slot.src_rect.x = @width2
 
 -     end
 
 -   end
 
 -   def slot_ud_update
 
 -     if @slot_move_count < @height2
 
 -       @slot_move_count += @slot_dynamic_speed
 
 -       @slot.src_rect.y = @slot_move_count
 
 -     else
 
 -       @slot_move_count = 0
 
 -       @slot.src_rect.y = @height2
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:13
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_flash_update
 
 -     @slot_flash_count += 1
 
 -     if @slot_flash_count > @slot_flash_time
 
 -       @slot_flash_count = 0
 
 -       @slot.flash(@slot_flash_color,@slot_flash_time)
 
 -     end
 
 -     @slot.update
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:14
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_fade_update
 
 -     if @slot.opacity <= 0
 
 -       @slot_fade_show = @slot_fade_show.abs
 
 -     end
 
 -     if @slot.opacity >= @slot_opacity
 
 -       @slot_fade_show = -(@slot_fade_show.abs)
 
 -     end
 
 -     @slot.opacity += @slot_fade_show
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:15
 
 -   #--------------------------------------------------------------------------
 
 -   def update
 
 -     slot_gradually_update if @slot_gradually
 
 -     send(@slot_update) if @slot_dynamic
 
 -     slot_flash_update if @slot_flash
 
 -     slot_fade_update if @slot_fade
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:零件 ID:16
 
 -   #--------------------------------------------------------------------------
 
 -   def dispose
 
 -     @back.dispose
 
 -     @back.bitmap.dispose
 
 -     @slot.dispose
 
 -     @slot.bitmap.dispose
 
 -     @frame.dispose
 
 -     @frame.bitmap.dispose
 
 -     if @free_sprite;@free.dispose;@free.bitmap.dispose;end
 
 -     if @value_sprite;@value.dispose;@value.bitmap.dispose;end
 
 -     @viewport.dispose
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:01
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_dynamic_speed(num)
 
 -     @slot_dynamic_speed = num
 
 -   end
 
 -   def slot_gradually_speed(num)
 
 -     @slot_gradually_speed = num
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:02
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_dynamic(tf)
 
 -     @slot_dynamic = tf
 
 -   end
 
 -   def slot_gradually(tf)
 
 -     @slot_gradually = tf
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:03
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_width_ratio(c, m)
 
 -     slot_width_set((@width*(c/m.to_f)).round)
 
 -   end
 
 -   def slot_width_percent(per)
 
 -     slot_width_set((@width*(per/100.0)).round)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:04
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_gradually_ratio(c, m)
 
 -     slot_gradually_set((@width*(c/m.to_f)).round)
 
 -   end
 
 -   def slot_gradually_percent(per)
 
 -     slot_gradually_set((@width*(per/100.0)).round)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:05
 
 -   #--------------------------------------------------------------------------
 
 -   def auto_normal_draw(num)
 
 -     value_cur(num)
 
 -     slot_width_ratio(@value_cur,@value_max)
 
 -   end
 
 -   def auto_gradually_draw(num)
 
 -     value_cur(num)
 
 -     slot_gradually_ratio(@value_cur,@value_max)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:06
 
 -   #--------------------------------------------------------------------------
 
 -   def solt_hu_change(num)
 
 -     @slot.bitmap.hue_change(num)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:07
 
 -   #--------------------------------------------------------------------------
 
 -   def solt_get_pixel(*xy)
 
 -     @slot.bitmap.get_pixel(*xy)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:08
 
 -   #--------------------------------------------------------------------------
 
 -   def solt_set_pixel(*xyc)
 
 -     @slot.bitmap.set_pixel(*xyc)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:09
 
 -   #--------------------------------------------------------------------------
 
 -   def solt_redraw
 
 -     @slot.bitmap.dispose
 
 -     send("solt_draw_#{@slot_type.to_s.downcase}")
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:10
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_type(type)
 
 -     @slot_type = type;solt_redraw
 
 -     @slot_update = "slot_#{@slot_type.to_s.downcase}_update"
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:11
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_color1(c)
 
 -     @slot_color1 = c
 
 -   end
 
 -   def slot_color2(c)
 
 -     @slot_color2 = c
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:12
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_opacity(o)
 
 -     @slot.opacity = @slot_opacity = o
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:13
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_flash(tf)
 
 -     @slot_flash = tf
 
 -   end
 
 -   def slot_flash_time(time)
 
 -     @slot_flash_time = time
 
 -   end
 
 -   def slot_flash_color(c)
 
 -     @slot_flash_color = c
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:14
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_fade(tf)
 
 -     @slot_fade = tf
 
 -   end
 
 -   def slot_fade_show(show)
 
 -     @slot_fade_show = show
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:15
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_tone(t)
 
 -     @slot.tone = t
 
 -   end
 
 -   def slot_color(c)
 
 -     @slot.color = c
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:16
 
 -   #--------------------------------------------------------------------------
 
 -   def slot_gradually_value(tf)
 
 -     @slot_gradually_value = tf
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:17
 
 -   #--------------------------------------------------------------------------
 
 -   def angle(num)
 
 -     @back.angle = num
 
 -     @slot.angle = num
 
 -     @frame.angle = num
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:18
 
 -   #--------------------------------------------------------------------------
 
 -   def blend_type(num)
 
 -     @back.blend_type = num
 
 -     @slot.blend_type = num
 
 -     @frame.blend_type = num
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:19
 
 -   #--------------------------------------------------------------------------
 
 -   def visible(tf)
 
 -     @viewport.visible = tf
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:20
 
 -   #--------------------------------------------------------------------------
 
 -   def back_opacity(o)
 
 -     @back.opacity = o
 
 -   end
 
 -   def frame_opacity(o)
 
 -     @back.opacity = o
 
 -   end
 
 -   def free_opacity(o)
 
 -     @free.opacity = o
 
 -   end
 
 -   def value_opacity(o)
 
 -     @value.opacity = o
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:21
 
 -   #--------------------------------------------------------------------------
 
 -   def back_visible(tf)
 
 -     @back.visible = tf
 
 -   end
 
 -   def slot_visible(tf)
 
 -     @slot.visible = tf
 
 -   end
 
 -   def frame_visible(tf)
 
 -     @frame.visible = tf
 
 -   end
 
 -   def free_visible(tf)
 
 -     @free.visible = tf
 
 -   end
 
 -   def value_visible(tf)
 
 -     @value.visible = tf
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:22
 
 -   #--------------------------------------------------------------------------
 
 -   def VIEWPORT;@viewport;end
 
 -   def SPRITE_BACK;@back;end
 
 -   def SPRITE_SLOT;@slot;end
 
 -   def SPRITE_FRAME;@frame;end
 
 -   def SPRITE_FREE;@free;end
 
 -   def SPRITE_VALUE;@value;end
 
 -   #--------------------------------------------------------------------------
 
 -   # TYPE:插件 ID:23
 
 -   #--------------------------------------------------------------------------
 
 -   def DynamicSlot_InstanceGet(symbol_instance_name)
 
 -     instance_variable_get(symbol_instance_name)
 
 -   end
 
 -   def DynamicSlot_InstanceSet(symbol_instance_name, setting)
 
 -     instance_variable_set(symbol_instance_name, setting)
 
 -   end
 
 - end
 
 - # -----------------------------------------------------------------------------
 
 - # ◆Script<GFR>
 
 - # -----------------------------------------------------------------------------
 
 - # TYPE:组件 ID:02
 
 - # -----------------------------------------------------------------------------
 
 - class Bitmap
 
 -   def GFR(x, y, width, height, color1, color2, vertical = false)
 
 -     r1 = color1.red;g1 = color1.green;b1 = color1.blue;o1 = color1.alpha
 
 -     r2 = color2.red;g2 = color2.green;b2 = color2.blue;o2 = color2.alpha
 
 -     case vertical
 
 -     when false
 
 -       w = (width-1).to_f;plus_r = (r2-r1)/w;plus_g = (g2-g1)/w
 
 -       plus_b = (b2-b1)/w;plus_o = (o2-o1)/w;width.times {|k|
 
 -       fill_rect(x+k, y, 1, height, Color.new(r1,g1,b1,o1))
 
 -       r1+=plus_r;g1+=plus_g;b1+=plus_b;o1+=plus_o}
 
 -     when true
 
 -       h = (height-1).to_f;plus_r = (r2-r1)/h;plus_g = (g2-g1)/h
 
 -       plus_b = (b2-b1)/h;plus_o = (o2-o1)/h;height.times {|i|
 
 -       fill_rect(x, y+i, width, 1, Color.new(r1,g1,b1,o1))
 
 -       r1+=plus_r;g1+=plus_g;b1+=plus_b;o1+=plus_o}
 
 -     end
 
 -   end
 
 - end
 
  复制代码 |   
 
 
 
 |