Project1

标题: 请教升降箭头的坐标怎么改啊? [打印本页]

作者: stella    时间: 2008-5-16 18:15
标题: 请教升降箭头的坐标怎么改啊?
我把装备显示加强整合到二刀流+装备扩展六边形界面脚本中去了,如果升降箭头的坐标按照装备扩展六边形界面脚本中的改,应该怎么改啊??

也就是把下面这两段合并,把装备显示加强脚本中的坐标数字改成装备扩展六边形界面脚本中的坐标



装备扩展六边形界面脚本,只保留其中的坐标数字
  1.       if @new_atk > @actor.atk
  2.         self.contents.font.color = system_color
  3.       else
  4.         self.contents.font.color = disabled_color
  5.       end
  6.       self.contents.draw_text(160, 100, 40, 32, "→", 1)
  7.       self.contents.draw_text(200, 100, 36, 32, @new_atk.to_s, 2)
  8.     end
  9.     if @new_pdef != nil and @new_pdef != @actor.pdef
  10.       if @new_pdef > @actor.pdef
  11.         self.contents.font.color = system_color
  12.       else
  13.         self.contents.font.color = disabled_color
  14.       end
  15.       self.contents.draw_text(160, 127, 40, 32, "→", 1)
  16.       self.contents.draw_text(200, 127, 36, 32, @new_pdef.to_s, 2)
  17.     end
  18.     if @new_mdef != nil and @new_mdef != @actor.mdef
  19.       if @new_mdef > @actor.mdef
  20.         self.contents.font.color = system_color
  21.       else
  22.         self.contents.font.color = disabled_color
  23.       end
  24.       self.contents.draw_text(160, 154, 40, 32, "→", 1)
  25.       self.contents.draw_text(200, 154, 36, 32, @new_mdef.to_s, 2)
  26.     end
  27.     if @new_eva != nil and @new_eva != @actor.eva
  28.       if @new_eva > @actor.eva
  29.         self.contents.font.color = system_color
  30.       else
  31.         self.contents.font.color = disabled_color
  32.       end
  33.       self.contents.draw_text(160, 181, 40, 32, "→", 1)
  34.       self.contents.draw_text(200, 181, 36, 32, @new_mdef.to_s, 2)
  35.     end
  36.     if @new_str != nil and @new_str != @actor.str
  37.       if @new_str > @actor.str
  38.         self.contents.font.color = system_color
  39.       else
  40.         self.contents.font.color = disabled_color
  41.       end
  42.       self.contents.draw_text(160, 211, 40, 32, "→", 1)
  43.       self.contents.draw_text(200, 211, 36, 32, @new_str.to_s, 2)
  44.     end
  45.     if @new_dex != nil and @new_dex != @actor.dex
  46.       if @new_dex > @actor.dex
  47.         self.contents.font.color = system_color
  48.       else
  49.         self.contents.font.color = disabled_color
  50.       end
  51.       self.contents.draw_text(160, 238, 40, 32, "→", 1)
  52.       self.contents.draw_text(200, 238, 36, 32, @new_dex.to_s, 2)
  53.     end
  54.     if @new_agi != nil and @new_agi != @actor.agi
  55.       if @new_agi > @actor.agi
  56.         self.contents.font.color = system_color
  57.       else
  58.         self.contents.font.color = disabled_color
  59.       end
  60.       self.contents.draw_text(160, 265, 40, 32, "→", 1)
  61.       self.contents.draw_text(200, 265, 36, 32, @new_agi.to_s, 2)
  62.     end
  63.     if @new_int != nil and @new_int != @actor.int
  64.       if @new_int > @actor.int
  65.         self.contents.font.color = system_color
  66.       else
  67.         self.contents.font.color = disabled_color
  68.       end
  69.       self.contents.draw_text(160, 292, 40, 32, "→", 1)
  70.       self.contents.draw_text(200, 292, 36, 32, @new_int.to_s, 2)
  71.     end
  72.   end
复制代码









装备显示加强
  1.       if @new_atk > @actor.atk
  2.         self.contents.blt(164, 64, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  3.       elsif @new_atk < @actor.atk
  4.         self.contents.blt(164, 64, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  5.       end
  6.       self.contents.font.color = @new_atk>@actor.atk ? up_color : down_color
  7.       self.contents.font.color = normal_color if @new_atk == @actor.atk
  8.       self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
  9.     end
  10.     if @new_pdef != nil
  11.       if @new_pdef > @actor.pdef
  12.         self.contents.blt(164, 96, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  13.       elsif @new_pdef < @actor.pdef
  14.         self.contents.blt(164, 96, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  15.       end
  16.       self.contents.font.color = @new_pdef>@actor.pdef ? up_color : down_color
  17.       self.contents.font.color = normal_color if @new_pdef == @actor.pdef
  18.       self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
  19.     end
  20.     if @new_mdef != nil
  21.       if @new_mdef > @actor.mdef
  22.         self.contents.blt(164, 128, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  23.       elsif @new_mdef < @actor.mdef
  24.         self.contents.blt(164, 128, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  25.       end
  26.       self.contents.font.color = @new_mdef>@actor.mdef ? up_color : down_color
  27.       self.contents.font.color = normal_color if @new_mdef == @actor.mdef
  28.       self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
  29.     end
  30.     if @new_eva != nil
  31.       if @new_eva > @actor.eva
  32.         self.contents.blt(164, 160, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  33.       elsif @new_eva < @actor.eva
  34.         self.contents.blt(164, 160, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  35.       end
  36.       self.contents.font.color = @new_eva>@actor.eva ? up_color : down_color
  37.       self.contents.font.color = normal_color if @new_eva == @actor.eva
  38.       self.contents.draw_text(200, 160, 36, 32, @new_eva.to_s, 2)
  39.     end
  40.     if @new_str != nil
  41.       if @new_str > @actor.str
  42.         self.contents.blt(164, 192, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  43.       elsif @new_str < @actor.str
  44.         self.contents.blt(164, 192, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  45.       end
  46.       self.contents.font.color = @new_str>@actor.str ? up_color : down_color
  47.       self.contents.font.color = normal_color if @new_str == @actor.str
  48.       self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
  49.     end
  50.     if @new_dex != nil
  51.       if @new_dex > @actor.dex
  52.         self.contents.blt(164, 224, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  53.       elsif @new_dex < @actor.dex
  54.         self.contents.blt(164, 224, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  55.       end
  56.       self.contents.font.color = @new_dex>@actor.dex ? up_color : down_color
  57.       self.contents.font.color = normal_color if @new_dex == @actor.dex
  58.       self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
  59.     end
  60.     if @new_agi != nil
  61.       if @new_agi > @actor.agi
  62.         self.contents.blt(164, 256, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  63.       elsif @new_agi < @actor.agi
  64.         self.contents.blt(164, 256, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  65.       end
  66.       self.contents.font.color = @new_agi>@actor.agi ? up_color : down_color
  67.       self.contents.font.color = normal_color if @new_agi == @actor.agi
  68.       self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
  69.     end
  70.     if @new_int != nil
  71.       if @new_int > @actor.int
  72.         self.contents.blt(164, 288, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  73.       elsif @new_int < @actor.int
  74.         self.contents.blt(164, 288, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  75.       end
  76.       self.contents.font.color = @new_int>@actor.int ? up_color : down_color
  77.       self.contents.font.color = normal_color if @new_int == @actor.int
  78.       self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
  79.     end
  80.   end
复制代码
[LINE]1,#dddddd[/LINE]此贴于 2008-5-22 23:43:19 被版主禾西提醒,请楼主看到后对本贴做出回应。 [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 沉影不器    时间: 2008-5-16 18:42
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1