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

Project1

 找回密码
 注册会员
搜索
查看: 1333|回复: 1
打印 上一主题 下一主题

[已经解决] 关于血条的2个问题

 关闭 [复制链接]

Lv3.寻梦者

梦石
0
星屑
3867
在线时间
1583 小时
注册时间
2006-5-5
帖子
2743
跳转到指定楼层
1
发表于 2009-7-31 01:09:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
  最近用了下面的血条,感觉很不错,但就是两个问题一直解决不了,请诸位大侠指点一下。
  第一个问题是敌人脚下的血条影响了游戏的平衡,如何去除?
  第二个问题是如何讲显示在的行走图改成在规定文件夹中的对应图片。
  谢谢!
  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 + 21
  54. # 歩行キャラグラフィックの描写
  55. draw_actor_graphic(actor, actor_x - 9, 116)
  56. # HP/SPメーターの描写
  57. draw_actor_hp_meter_line(actor, actor_x, 52, 96, 12)
  58. draw_actor_sp_meter_line(actor, actor_x, 84, 96, 12)
  59. # HP数値の描写
  60. self.contents.font.size = 24 # HP/SP数値の文字の大きさ
  61. self.contents.font.color = Color.new(0,0,0,192)
  62. self.contents.draw_text(actor_x, 40, 96, 24, actor.hp.to_s, 2)
  63. self.contents.font.color = actor.hp == 0 ? knockout_color :
  64. actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  65. self.contents.draw_text(actor_x-2, 38, 96, 24, actor.hp.to_s, 2)
  66. # SP数値の描写
  67. self.contents.font.color = Color.new(0,0,0,192)
  68. self.contents.draw_text(actor_x, 72, 96, 24, actor.sp.to_s, 2)
  69. self.contents.font.color = actor.sp == 0 ? knockout_color :
  70. actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  71. self.contents.draw_text(actor_x-2, 70, 96, 24, actor.sp.to_s, 2)
  72. # 用語「HP」と用語「SP」の描写
  73. self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  74. self.contents.font.color = Color.new(0,0,0,192)
  75. self.contents.draw_text(actor_x+2, 32, 196, 24, $data_system.words.hp)
  76. self.contents.draw_text(actor_x+2, 64, 196, 24, $data_system.words.sp)
  77. self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  78. self.contents.draw_text(actor_x, 30, 196, 24, $data_system.words.hp)
  79. self.contents.draw_text(actor_x, 62, 196, 24, $data_system.words.sp)
  80. # ステートの描写
  81. draw_actor_state(actor, actor_x, 100)
  82. # 値を更新
  83. @previous_hp[i] = actor.hp
  84. @previous_hp[i] = actor.hp
  85. end
  86. end
  87. end
  88. #==============================================================================
  89. # ■ Window_Base
  90. #==============================================================================
  91. class Window_Base < Window
  92. #--------------------------------------------------------------------------
  93. # ● HPメーター の描画
  94. #--------------------------------------------------------------------------
  95. def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  96. w = width * actor.hp / [actor.maxhp,1].max
  97. hp_color_1 = Color.new(255, 0, 0, 192)
  98. hp_color_2 = Color.new(255, 255, 0, 192)
  99. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  100. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  101. x -= 1
  102. y += (height/4).floor
  103. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  104. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  105. x -= 1
  106. y += (height/4).ceil
  107. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  108. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  109. x -= 1
  110. y += (height/4).ceil
  111. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  112. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  113. end
  114. #--------------------------------------------------------------------------
  115. # ● SPメーター の描画
  116. #--------------------------------------------------------------------------
  117. def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  118. w = width * actor.sp / [actor.maxsp,1].max
  119. hp_color_1 = Color.new( 0, 0, 255, 192)
  120. hp_color_2 = Color.new( 0, 255, 255, 192)
  121. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  122. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  123. x -= 1
  124. y += (height/4).floor
  125. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  126. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  127. x -= 1
  128. y += (height/4).ceil
  129. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  130. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  131. x -= 1
  132. y += (height/4).ceil
  133. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  134. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  135. end
  136. #--------------------------------------------------------------------------
  137. # ● 名前の描画
  138. #--------------------------------------------------------------------------
  139. alias xrxs_bp7_draw_actor_name draw_actor_name
  140. def draw_actor_name(actor, x, y)
  141. xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  142. end
  143. #--------------------------------------------------------------------------
  144. # ● ステートの描画
  145. #--------------------------------------------------------------------------
  146. alias xrxs_bp7_draw_actor_state draw_actor_state
  147. def draw_actor_state(actor, x, y, width = 120)
  148. xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  149. end
  150. #--------------------------------------------------------------------------
  151. # ● HP の描画
  152. #--------------------------------------------------------------------------
  153. alias xrxs_bp7_draw_actor_hp draw_actor_hp
  154. def draw_actor_hp(actor, x, y, width = 144)
  155. xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  156. end
  157. #--------------------------------------------------------------------------
  158. # ● SP の描画
  159. #--------------------------------------------------------------------------
  160. alias xrxs_bp7_draw_actor_sp draw_actor_sp
  161. def draw_actor_sp(actor, x, y, width = 144)
  162. xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  163. end
  164. end
  165. #==============================================================================
  166. # ■ Scene_Battle
  167. #==============================================================================
  168. class Scene_Battle
  169. #--------------------------------------------------------------------------
  170. # ● フレーム更新
  171. #--------------------------------------------------------------------------
  172. alias xrxs_bp7_update update
  173. def update
  174. xrxs_bp7_update
  175. # メッセージウィンドウ表示中の場合
  176. if $game_temp.message_window_showing
  177. @status_window.update_cp_only = true
  178. else
  179. @status_window.update_cp_only = false
  180. end
  181. end
  182. end
  183. #==============================================================================
  184. # ◇ 外部ライブラリ
  185. #==============================================================================
  186. class Window_Base
  187. #--------------------------------------------------------------------------
  188. # ● ライン描画 軽量版 by 桜雅 在土
  189. #--------------------------------------------------------------------------
  190. def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  191. # 描写距離の計算。大きめに直角時の長さ。
  192. distance = (start_x - end_x).abs + (start_y - end_y).abs
  193. # 描写開始
  194. for i in 1..distance
  195. x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  196. y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  197. self.contents.set_pixel(x, y, start_color)
  198. end
  199. end
  200. #--------------------------------------------------------------------------
  201. # ● ライン描画 by 桜雅 在土
  202. #--------------------------------------------------------------------------
  203. def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  204. # 描写距離の計算。大きめに直角時の長さ。
  205. distance = (start_x - end_x).abs + (start_y - end_y).abs
  206. # 描写開始
  207. if end_color == start_color
  208. for i in 1..distance
  209. x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  210. y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  211. if width == 1
  212. self.contents.set_pixel(x, y, start_color)
  213. else
  214. self.contents.fill_rect(x, y, width, width, start_color)
  215. end
  216. end
  217. else
  218. for i in 1..distance
  219. x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  220. y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  221. r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  222. g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  223. b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  224. a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  225. if width == 1
  226. self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  227. else
  228. self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  229. end
  230. end
  231. end
  232. end
  233. end

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

评分

参与人数 1星屑 +40 收起 理由
钢铁列兵 + 40

查看全部评分

步兵中尉

Lv1.梦旅人

夜天の主

梦石
0
星屑
124
在线时间
1552 小时
注册时间
2008-4-13
帖子
2347

开拓者第4届短篇游戏比赛亚军

2
发表于 2009-7-31 03:14:58 | 只看该作者
答一:在咱的工程里测试的时候敌人脚下没血条,LZ是加了其他脚本才会显示的吧..

答二:脚本修改后如下:

  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. ##############################修改############################################
  26. @sta_back = []
  27. for actor_index in 1..$game_party.actors.size
  28. @sta_back[actor_index] = Sprite.new
  29. @sta_back[actor_index].bitmap = Bitmap.new("Graphics/Pictures/00"+$game_party.actors[actor_index - 1].id.to_s)
  30. @sta_back[actor_index].x = (actor_index- 1)* 160 +7#在这里调整图片x坐标
  31. @sta_back[actor_index].y = 480 - 78 -14#在这里调整图片y坐标
  32. @sta_back[actor_index].z = self.z+1#在这里调整图片优先级
  33. end
  34. ##############################修改############################################
  35. # ↓Full-Viewの場合は下二行の # を消してください。
  36. #self.opacity = 0
  37. #self.back_opacity = 0
  38. ##############################修改############################################
  39. refresh
  40. ##############################修改############################################
  41. end
  42. ##############################修改############################################
  43. def dispose
  44.    super  
  45.    for actor_index in 1..$game_party.actors.size
  46.       @sta_back[actor_index].bitmap.dispose
  47.       @sta_back[actor_index].dispose
  48.    end
  49. end
  50. ##############################修改############################################
  51. #--------------------------------------------------------------------------
  52. # ● リフレッシュ
  53. #--------------------------------------------------------------------------
  54. alias xrxs_bp7_refresh refresh
  55. def refresh
  56. # CPメーターの更新のみ の場合
  57. if @update_cp_only
  58. xrxs_bp7_refresh
  59. return
  60. end
  61. # 変更するものがない場合、飛ばす
  62. @item_max = $game_party.actors.size
  63. bool = false
  64. for i in 0...@item_max
  65. actor = $game_party.actors[i]
  66. if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  67. bool = true
  68. end
  69. end
  70. return if bool == false
  71. # 描写を開始
  72. self.contents.clear
  73. for i in 0...@item_max
  74. actor = $game_party.actors[i]
  75. actor_x = i * 160 + 21
  76. # 歩行キャラグラフィックの描写
  77. #draw_actor_graphic(actor, actor_x - 9, 116)

  78. # HP/SPメーターの描写
  79. draw_actor_hp_meter_line(actor, actor_x, 52, 96, 12)
  80. draw_actor_sp_meter_line(actor, actor_x, 84, 96, 12)
  81. # HP数値の描写
  82. self.contents.font.size = 24 # HP/SP数値の文字の大きさ
  83. self.contents.font.color = Color.new(0,0,0,192)
  84. self.contents.draw_text(actor_x, 40, 96, 24, actor.hp.to_s, 2)
  85. self.contents.font.color = actor.hp == 0 ? knockout_color :
  86. actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  87. self.contents.draw_text(actor_x-2, 38, 96, 24, actor.hp.to_s, 2)
  88. # SP数値の描写
  89. self.contents.font.color = Color.new(0,0,0,192)
  90. self.contents.draw_text(actor_x, 72, 96, 24, actor.sp.to_s, 2)
  91. self.contents.font.color = actor.sp == 0 ? knockout_color :
  92. actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  93. self.contents.draw_text(actor_x-2, 70, 96, 24, actor.sp.to_s, 2)
  94. # 用語「HP」と用語「SP」の描写
  95. self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  96. self.contents.font.color = Color.new(0,0,0,192)
  97. self.contents.draw_text(actor_x+2, 32, 196, 24, $data_system.words.hp)
  98. self.contents.draw_text(actor_x+2, 64, 196, 24, $data_system.words.sp)
  99. self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  100. self.contents.draw_text(actor_x, 30, 196, 24, $data_system.words.hp)
  101. self.contents.draw_text(actor_x, 62, 196, 24, $data_system.words.sp)
  102. # ステートの描写
  103. draw_actor_state(actor, actor_x, 100)
  104. # 値を更新
  105. @previous_hp[i] = actor.hp
  106. @previous_hp[i] = actor.hp
  107. end
  108. end
  109. end
  110. #==============================================================================
  111. # ■ Window_Base
  112. #==============================================================================
  113. class Window_Base < Window
  114. #--------------------------------------------------------------------------
  115. # ● HPメーター の描画
  116. #--------------------------------------------------------------------------
  117. def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  118. w = width * actor.hp / [actor.maxhp,1].max
  119. hp_color_1 = Color.new(255, 0, 0, 192)
  120. hp_color_2 = Color.new(255, 255, 0, 192)
  121. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  122. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  123. x -= 1
  124. y += (height/4).floor
  125. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  126. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  127. x -= 1
  128. y += (height/4).ceil
  129. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  130. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  131. x -= 1
  132. y += (height/4).ceil
  133. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  134. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  135. end
  136. #--------------------------------------------------------------------------
  137. # ● SPメーター の描画
  138. #--------------------------------------------------------------------------
  139. def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  140. w = width * actor.sp / [actor.maxsp,1].max
  141. hp_color_1 = Color.new( 0, 0, 255, 192)
  142. hp_color_2 = Color.new( 0, 255, 255, 192)
  143. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  144. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  145. x -= 1
  146. y += (height/4).floor
  147. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  148. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  149. x -= 1
  150. y += (height/4).ceil
  151. self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  152. draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  153. x -= 1
  154. y += (height/4).ceil
  155. self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  156. draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  157. end
  158. #--------------------------------------------------------------------------
  159. # ● 名前の描画
  160. #--------------------------------------------------------------------------
  161. alias xrxs_bp7_draw_actor_name draw_actor_name
  162. def draw_actor_name(actor, x, y)
  163. xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  164. end
  165. #--------------------------------------------------------------------------
  166. # ● ステートの描画
  167. #--------------------------------------------------------------------------
  168. alias xrxs_bp7_draw_actor_state draw_actor_state
  169. def draw_actor_state(actor, x, y, width = 120)
  170. xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  171. end
  172. #--------------------------------------------------------------------------
  173. # ● HP の描画
  174. #--------------------------------------------------------------------------
  175. alias xrxs_bp7_draw_actor_hp draw_actor_hp
  176. def draw_actor_hp(actor, x, y, width = 144)
  177. xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  178. end
  179. #--------------------------------------------------------------------------
  180. # ● SP の描画
  181. #--------------------------------------------------------------------------
  182. alias xrxs_bp7_draw_actor_sp draw_actor_sp
  183. def draw_actor_sp(actor, x, y, width = 144)
  184. xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  185. end
  186. end
  187. #==============================================================================
  188. # ■ Scene_Battle
  189. #==============================================================================
  190. class Scene_Battle
  191. #--------------------------------------------------------------------------
  192. # ● フレーム更新
  193. #--------------------------------------------------------------------------
  194. alias xrxs_bp7_update update
  195. def update
  196. xrxs_bp7_update
  197. # メッセージウィンドウ表示中の場合
  198. if $game_temp.message_window_showing
  199. @status_window.update_cp_only = true
  200. else
  201. @status_window.update_cp_only = false
  202. end
  203. end
  204. end
  205. #==============================================================================
  206. # ◇ 外部ライブラリ
  207. #==============================================================================
  208. class Window_Base
  209. #--------------------------------------------------------------------------
  210. # ● ライン描画 軽量版 by 桜雅 在土
  211. #--------------------------------------------------------------------------
  212. def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  213. # 描写距離の計算。大きめに直角時の長さ。
  214. distance = (start_x - end_x).abs + (start_y - end_y).abs
  215. # 描写開始
  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. self.contents.set_pixel(x, y, start_color)
  220. end
  221. end
  222. #--------------------------------------------------------------------------
  223. # ● ライン描画 by 桜雅 在土
  224. #--------------------------------------------------------------------------
  225. def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  226. # 描写距離の計算。大きめに直角時の長さ。
  227. distance = (start_x - end_x).abs + (start_y - end_y).abs
  228. # 描写開始
  229. if end_color == start_color
  230. for i in 1..distance
  231. x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  232. y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  233. if width == 1
  234. self.contents.set_pixel(x, y, start_color)
  235. else
  236. self.contents.fill_rect(x, y, width, width, start_color)
  237. end
  238. end
  239. else
  240. for i in 1..distance
  241. x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  242. y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  243. r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  244. g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  245. b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  246. a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  247. if width == 1
  248. self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  249. else
  250. self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  251. end
  252. end
  253. end
  254. end
  255. end

  256. #==============================================================================
  257. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  258. #==============================================================================
复制代码
咱修改的效果是显示在Graphics/Pictures/下的图片,图片名称为00+角色ID号,例如1号角色就是001,11号角色就是0011..
至于图片坐标调整请参看脚本中的注释~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-1-11 14:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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