设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1354|回复: 3

求高级修改,我方血条动画显示.

 关闭 [复制链接]

Lv2.观梦者

梦石
0
星屑
253
在线时间
574 小时
注册时间
2006-8-25
帖子
969
发表于 2007-8-24 19:39:40 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
损血与回血,复活时(包括HP和SP),生命会以迅雷不及掩耳之势变成"actor.maxhp/actor.hp"("actor.maxsp/actor.sp")
我想把这个设置改为高级设置.
下面是HP/SP的(****,血条X坐标,血条Y坐标,血条长度,血条高度)
draw_actor_hp_meter_line(actor, actor_x, 62, 96, 10)
draw_actor_sp_meter_line(actor, actor_x, 80, 96, 10)
加减血条能否改成95,94,93..0这样的动画?(注意:这只是事例,不是叫大家改血条的长度...
是说1 x 10,1 x 10得减而已...就是动画的意思)

下面这个是血条颜色,整条血条由满血(红)到没血(黄)显示,会脚本的都看得懂吧-.-
  def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
    w = width * actor.hp / [actor.maxhp,1].max
    hp_color_1 = Color.new(255, 255, 0, 192)
    hp_color_2 = Color.new(255, 0, 0, 192)

下面是这个血条脚本
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # ————————————————————————————————————

  5. # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
  6. # by 桜雅 在土

  7. #==============================================================================
  8. # ■ Window_BattleStatus
  9. #==============================================================================
  10. class Window_BattleStatus < Window_Base
  11.   #--------------------------------------------------------------------------
  12.   # ● 公開インスタンス変数
  13.   #--------------------------------------------------------------------------
  14.   attr_accessor :update_cp_only # CPメーターのみの更新
  15.   #--------------------------------------------------------------------------
  16.   # ● オブジェクト初期化
  17.   #--------------------------------------------------------------------------
  18.   alias xrxs_bp7_initialize initialize
  19.   def initialize
  20.     # 初期化
  21.     @previous_hp = []
  22.     @previous_sp = []
  23.     # 呼び戻す
  24.     xrxs_bp7_initialize
  25.     # ↓Full-Viewの場合は下二行の # を消してください。
  26.     #self.opacity = 0
  27.     #self.back_opacity = 0
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● リフレッシュ
  31.   #--------------------------------------------------------------------------
  32.   alias xrxs_bp7_refresh refresh
  33.   def refresh
  34.     # CPメーターの更新のみ の場合
  35.     if @update_cp_only
  36.       xrxs_bp7_refresh
  37.       return
  38.     end
  39.     # 変更するものがない場合、飛ばす
  40.     @item_max = $game_party.actors.size
  41.     bool = false
  42.     for i in 0...@item_max
  43.       actor = $game_party.actors[i]
  44.       if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  45.         bool = true
  46.       end
  47.     end
  48.     return if bool == false
  49.     # 描写を開始
  50.     self.contents.clear
  51.     for i in 0...@item_max
  52.       actor = $game_party.actors[i]
  53.       actor_x = i * 160 + 35
  54.       # 歩行キャラグラフィックの描写
  55.       draw_actor_battlegraphic(actor, actor_x - 40, 0)
  56.       # HP/SPメーターの描写
  57.       draw_actor_hp_meter_line(actor, actor_x, 62, 96, 10)
  58.       draw_actor_sp_meter_line(actor, actor_x, 80, 96, 10)
  59.       # HP数値の描写
  60.       self.contents.font.size = 12 # HP/SP数値の文字の大きさ
  61.       self.contents.font.color = Color.new(0,0,0,192)
  62.       self.contents.draw_text(actor_x-2, 56, 96, 24, actor.hp.to_s, 2)
  63.       case actor.hp / actor.maxhp * 4
  64.       when 1 #(四分之一)
  65.       self.contents.font.color = Color.new(255,0,0)
  66.       when 2 #(二分之一)
  67.       self.contents.font.color = Color.new(255,103,0)
  68.       when 3 #(四分之三)
  69.       self.contents.font.color = Color.new(255,170,0)
  70.       when 4 #(完整的)
  71.       self.contents.font.color = normal_color
  72.       self.contents.draw_text(actor_x-4, 54, 96, 24, actor.hp.to_s, 2)
  73.       # SP数値の描写
  74.       self.contents.font.color = Color.new(0,0,0,192)
  75.       self.contents.draw_text(actor_x-2, 74, 96, 24, actor.sp.to_s, 2)
  76.       self.contents.font.color = actor.sp == 0 ? knockout_color :
  77.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  78.       self.contents.draw_text(actor_x-4, 72, 96, 24, actor.sp.to_s, 2)
  79.       # 用語「HP」と用語「SP」の描写
  80.       self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  81.       self.contents.font.color = Color.new(0,0,0,0)
  82.       self.contents.draw_text(actor_x+2, 32, 196, 24, $data_system.words.hp)
  83.       self.contents.draw_text(actor_x+2, 64, 196, 24, $data_system.words.sp)
  84.       self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  85.       self.contents.draw_text(actor_x - 10, 62, 196, 24, $data_system.words.hp)
  86.       self.contents.draw_text(actor_x - 10, 62, 196, 24, $data_system.words.sp)
  87.       # ステートの描写
  88.       draw_actor_state(actor, actor_x, 100)
  89.       # 値を更新
  90.       @previous_hp[i] = actor.hp
  91.       @previous_hp[i] = actor.hp
  92.       end
  93.     end
  94.   end
  95. end
  96. #==============================================================================
  97. # ■ Window_Base
  98. #==============================================================================
  99. class Window_Base < Window
  100.   #--------------------------------------------------------------------------
  101.   # ● HPメーター の描画
  102.   #--------------------------------------------------------------------------
  103.   def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  104.     w = width * actor.hp / [actor.maxhp,1].max
  105.     hp_color_1 = Color.new(255, 255, 0, 192)
  106.     hp_color_2 = Color.new(255, 0, 0, 192)
  107.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  108.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  109.     x -= 1
  110.     y += (height/4).floor
  111.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  112.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  113.     x -= 1
  114.     y += (height/4).ceil
  115.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  116.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  117.     x -= 1
  118.     y += (height/4).ceil
  119.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  120.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  121.   end
  122.   #--------------------------------------------------------------------------
  123.   # ● SPメーター の描画
  124.   #--------------------------------------------------------------------------
  125.   def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  126.     w = width * actor.sp / [actor.maxsp,1].max
  127.     hp_color_1 = Color.new( 0, 255, 255, 192)
  128.     hp_color_2 = Color.new( 0, 0, 255, 192)
  129.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  130.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  131.     x -= 1
  132.     y += (height/4).floor
  133.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  134.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  135.     x -= 1
  136.     y += (height/4).ceil
  137.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  138.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  139.     x -= 1
  140.     y += (height/4).ceil
  141.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  142.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ● 名前の描画
  146.   #--------------------------------------------------------------------------
  147.   alias xrxs_bp7_draw_actor_name draw_actor_name
  148.   def draw_actor_name(actor, x, y)
  149.     xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  150.   end
  151.   #--------------------------------------------------------------------------
  152.   # ● ステートの描画
  153.   #--------------------------------------------------------------------------
  154.   alias xrxs_bp7_draw_actor_state draw_actor_state
  155.   def draw_actor_state(actor, x, y, width = 120)
  156.     xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  157.   end
  158.   #--------------------------------------------------------------------------
  159.   # ● HP の描画
  160.   #--------------------------------------------------------------------------
  161.   alias xrxs_bp7_draw_actor_hp draw_actor_hp
  162.   def draw_actor_hp(actor, x, y, width = 144)
  163.     xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  164.   end
  165.   #--------------------------------------------------------------------------
  166.   # ● SP の描画
  167.   #--------------------------------------------------------------------------
  168.   alias xrxs_bp7_draw_actor_sp draw_actor_sp
  169.   def draw_actor_sp(actor, x, y, width = 144)
  170.     xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  171.   end
  172. end
  173. #==============================================================================
  174. # ■ Scene_Battle
  175. #==============================================================================
  176. class Scene_Battle
  177.   #--------------------------------------------------------------------------
  178.   # ● フレーム更新
  179.   #--------------------------------------------------------------------------
  180.   alias xrxs_bp7_update update
  181.   def update
  182.     xrxs_bp7_update
  183.     # メッセージウィンドウ表示中の場合
  184.     if $game_temp.message_window_showing
  185.       @status_window.update_cp_only = true      
  186.     else
  187.       @status_window.update_cp_only = false
  188.     end
  189.   end
  190. end
  191. #==============================================================================
  192. # ◇ 外部ライブラリ
  193. #==============================================================================
  194. class Window_Base
  195.   #--------------------------------------------------------------------------
  196.   # ● ライン描画 軽量版 by 桜雅 在土
  197.   #--------------------------------------------------------------------------
  198.   def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  199.     # 描写距離の計算。大きめに直角時の長さ。
  200.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  201.     # 描写開始
  202.     for i in 1..distance
  203.       x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  204.       y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  205.       self.contents.set_pixel(x, y, start_color)
  206.     end
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # ● ライン描画 by 桜雅 在土
  210.   #--------------------------------------------------------------------------
  211.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  212.     # 描写距離の計算。大きめに直角時の長さ。
  213.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  214.     # 描写開始
  215.     if end_color == start_color
  216.       for i in 1..distance
  217.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  218.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  219.         if width == 1
  220.           self.contents.set_pixel(x, y, start_color)
  221.         else
  222.           self.contents.fill_rect(x, y, width, width, start_color)
  223.         end
  224.       end
  225.     else
  226.       for i in 1..distance
  227.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  228.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  229.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  230.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  231.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  232.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  233.         if width == 1
  234.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  235.         else
  236.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  237.         end
  238.       end
  239.     end
  240.   end
  241. end


  242. #==============================================================================
  243. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  244. #==============================================================================
复制代码

Lv2.观梦者

梦石
0
星屑
253
在线时间
574 小时
注册时间
2006-8-25
帖子
969
 楼主| 发表于 2007-8-24 19:39:40 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
损血与回血,复活时(包括HP和SP),生命会以迅雷不及掩耳之势变成"actor.maxhp/actor.hp"("actor.maxsp/actor.sp")
我想把这个设置改为高级设置.
下面是HP/SP的(****,血条X坐标,血条Y坐标,血条长度,血条高度)
draw_actor_hp_meter_line(actor, actor_x, 62, 96, 10)
draw_actor_sp_meter_line(actor, actor_x, 80, 96, 10)
加减血条能否改成95,94,93..0这样的动画?(注意:这只是事例,不是叫大家改血条的长度...
是说1 x 10,1 x 10得减而已...就是动画的意思)

下面这个是血条颜色,整条血条由满血(红)到没血(黄)显示,会脚本的都看得懂吧-.-
  def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
    w = width * actor.hp / [actor.maxhp,1].max
    hp_color_1 = Color.new(255, 255, 0, 192)
    hp_color_2 = Color.new(255, 0, 0, 192)

下面是这个血条脚本
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # ————————————————————————————————————

  5. # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
  6. # by 桜雅 在土

  7. #==============================================================================
  8. # ■ Window_BattleStatus
  9. #==============================================================================
  10. class Window_BattleStatus < Window_Base
  11.   #--------------------------------------------------------------------------
  12.   # ● 公開インスタンス変数
  13.   #--------------------------------------------------------------------------
  14.   attr_accessor :update_cp_only # CPメーターのみの更新
  15.   #--------------------------------------------------------------------------
  16.   # ● オブジェクト初期化
  17.   #--------------------------------------------------------------------------
  18.   alias xrxs_bp7_initialize initialize
  19.   def initialize
  20.     # 初期化
  21.     @previous_hp = []
  22.     @previous_sp = []
  23.     # 呼び戻す
  24.     xrxs_bp7_initialize
  25.     # ↓Full-Viewの場合は下二行の # を消してください。
  26.     #self.opacity = 0
  27.     #self.back_opacity = 0
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● リフレッシュ
  31.   #--------------------------------------------------------------------------
  32.   alias xrxs_bp7_refresh refresh
  33.   def refresh
  34.     # CPメーターの更新のみ の場合
  35.     if @update_cp_only
  36.       xrxs_bp7_refresh
  37.       return
  38.     end
  39.     # 変更するものがない場合、飛ばす
  40.     @item_max = $game_party.actors.size
  41.     bool = false
  42.     for i in 0...@item_max
  43.       actor = $game_party.actors[i]
  44.       if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  45.         bool = true
  46.       end
  47.     end
  48.     return if bool == false
  49.     # 描写を開始
  50.     self.contents.clear
  51.     for i in 0...@item_max
  52.       actor = $game_party.actors[i]
  53.       actor_x = i * 160 + 35
  54.       # 歩行キャラグラフィックの描写
  55.       draw_actor_battlegraphic(actor, actor_x - 40, 0)
  56.       # HP/SPメーターの描写
  57.       draw_actor_hp_meter_line(actor, actor_x, 62, 96, 10)
  58.       draw_actor_sp_meter_line(actor, actor_x, 80, 96, 10)
  59.       # HP数値の描写
  60.       self.contents.font.size = 12 # HP/SP数値の文字の大きさ
  61.       self.contents.font.color = Color.new(0,0,0,192)
  62.       self.contents.draw_text(actor_x-2, 56, 96, 24, actor.hp.to_s, 2)
  63.       case actor.hp / actor.maxhp * 4
  64.       when 1 #(四分之一)
  65.       self.contents.font.color = Color.new(255,0,0)
  66.       when 2 #(二分之一)
  67.       self.contents.font.color = Color.new(255,103,0)
  68.       when 3 #(四分之三)
  69.       self.contents.font.color = Color.new(255,170,0)
  70.       when 4 #(完整的)
  71.       self.contents.font.color = normal_color
  72.       self.contents.draw_text(actor_x-4, 54, 96, 24, actor.hp.to_s, 2)
  73.       # SP数値の描写
  74.       self.contents.font.color = Color.new(0,0,0,192)
  75.       self.contents.draw_text(actor_x-2, 74, 96, 24, actor.sp.to_s, 2)
  76.       self.contents.font.color = actor.sp == 0 ? knockout_color :
  77.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  78.       self.contents.draw_text(actor_x-4, 72, 96, 24, actor.sp.to_s, 2)
  79.       # 用語「HP」と用語「SP」の描写
  80.       self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  81.       self.contents.font.color = Color.new(0,0,0,0)
  82.       self.contents.draw_text(actor_x+2, 32, 196, 24, $data_system.words.hp)
  83.       self.contents.draw_text(actor_x+2, 64, 196, 24, $data_system.words.sp)
  84.       self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  85.       self.contents.draw_text(actor_x - 10, 62, 196, 24, $data_system.words.hp)
  86.       self.contents.draw_text(actor_x - 10, 62, 196, 24, $data_system.words.sp)
  87.       # ステートの描写
  88.       draw_actor_state(actor, actor_x, 100)
  89.       # 値を更新
  90.       @previous_hp[i] = actor.hp
  91.       @previous_hp[i] = actor.hp
  92.       end
  93.     end
  94.   end
  95. end
  96. #==============================================================================
  97. # ■ Window_Base
  98. #==============================================================================
  99. class Window_Base < Window
  100.   #--------------------------------------------------------------------------
  101.   # ● HPメーター の描画
  102.   #--------------------------------------------------------------------------
  103.   def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  104.     w = width * actor.hp / [actor.maxhp,1].max
  105.     hp_color_1 = Color.new(255, 255, 0, 192)
  106.     hp_color_2 = Color.new(255, 0, 0, 192)
  107.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  108.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  109.     x -= 1
  110.     y += (height/4).floor
  111.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  112.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  113.     x -= 1
  114.     y += (height/4).ceil
  115.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  116.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  117.     x -= 1
  118.     y += (height/4).ceil
  119.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  120.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  121.   end
  122.   #--------------------------------------------------------------------------
  123.   # ● SPメーター の描画
  124.   #--------------------------------------------------------------------------
  125.   def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  126.     w = width * actor.sp / [actor.maxsp,1].max
  127.     hp_color_1 = Color.new( 0, 255, 255, 192)
  128.     hp_color_2 = Color.new( 0, 0, 255, 192)
  129.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  130.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  131.     x -= 1
  132.     y += (height/4).floor
  133.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  134.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  135.     x -= 1
  136.     y += (height/4).ceil
  137.     self.contents.fill_rect(x, y, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  138.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  139.     x -= 1
  140.     y += (height/4).ceil
  141.     self.contents.fill_rect(x, y, width, (height/4).floor, Color.new(0, 0, 0, 128))
  142.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ● 名前の描画
  146.   #--------------------------------------------------------------------------
  147.   alias xrxs_bp7_draw_actor_name draw_actor_name
  148.   def draw_actor_name(actor, x, y)
  149.     xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  150.   end
  151.   #--------------------------------------------------------------------------
  152.   # ● ステートの描画
  153.   #--------------------------------------------------------------------------
  154.   alias xrxs_bp7_draw_actor_state draw_actor_state
  155.   def draw_actor_state(actor, x, y, width = 120)
  156.     xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  157.   end
  158.   #--------------------------------------------------------------------------
  159.   # ● HP の描画
  160.   #--------------------------------------------------------------------------
  161.   alias xrxs_bp7_draw_actor_hp draw_actor_hp
  162.   def draw_actor_hp(actor, x, y, width = 144)
  163.     xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  164.   end
  165.   #--------------------------------------------------------------------------
  166.   # ● SP の描画
  167.   #--------------------------------------------------------------------------
  168.   alias xrxs_bp7_draw_actor_sp draw_actor_sp
  169.   def draw_actor_sp(actor, x, y, width = 144)
  170.     xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  171.   end
  172. end
  173. #==============================================================================
  174. # ■ Scene_Battle
  175. #==============================================================================
  176. class Scene_Battle
  177.   #--------------------------------------------------------------------------
  178.   # ● フレーム更新
  179.   #--------------------------------------------------------------------------
  180.   alias xrxs_bp7_update update
  181.   def update
  182.     xrxs_bp7_update
  183.     # メッセージウィンドウ表示中の場合
  184.     if $game_temp.message_window_showing
  185.       @status_window.update_cp_only = true      
  186.     else
  187.       @status_window.update_cp_only = false
  188.     end
  189.   end
  190. end
  191. #==============================================================================
  192. # ◇ 外部ライブラリ
  193. #==============================================================================
  194. class Window_Base
  195.   #--------------------------------------------------------------------------
  196.   # ● ライン描画 軽量版 by 桜雅 在土
  197.   #--------------------------------------------------------------------------
  198.   def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  199.     # 描写距離の計算。大きめに直角時の長さ。
  200.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  201.     # 描写開始
  202.     for i in 1..distance
  203.       x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  204.       y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  205.       self.contents.set_pixel(x, y, start_color)
  206.     end
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # ● ライン描画 by 桜雅 在土
  210.   #--------------------------------------------------------------------------
  211.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  212.     # 描写距離の計算。大きめに直角時の長さ。
  213.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  214.     # 描写開始
  215.     if end_color == start_color
  216.       for i in 1..distance
  217.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  218.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  219.         if width == 1
  220.           self.contents.set_pixel(x, y, start_color)
  221.         else
  222.           self.contents.fill_rect(x, y, width, width, start_color)
  223.         end
  224.       end
  225.     else
  226.       for i in 1..distance
  227.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  228.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  229.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  230.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  231.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  232.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  233.         if width == 1
  234.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  235.         else
  236.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  237.         end
  238.       end
  239.     end
  240.   end
  241. end


  242. #==============================================================================
  243. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  244. #==============================================================================
复制代码
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
453
发表于 2007-8-24 20:24:22 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
253
在线时间
574 小时
注册时间
2006-8-25
帖子
969
 楼主| 发表于 2007-8-24 20:26:28 | 显示全部楼层
其实已经看过了......不过进入游戏的时候出错,改的地方也多...比较乱...如果可以整理出来就更好了-.-
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2026-6-25 05:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表