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

Project1

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

哪位高手能把45度5人和动态战斗横版整合了?

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2006-10-17
帖子
112
跳转到指定楼层
1
发表于 2008-5-18 01:31:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
即把:
http://rpg.blue/web/htm/news1046.htm里的动态效果整合到
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. #==============================================================================
  5. # ■ Game_Actor
  6. #------------------------------------------------------------------------------
  7. #  处理角色的类。本类在 Game_Actors 类 ($game_actors)
  8. # 的内部使用、Game_Party 类请参考 ($game_party) 。
  9. #==============================================================================

  10. class Game_Actor < Game_Battler
  11.   #--------------------------------------------------------------------------
  12.   # ● 取得战斗画面的 X 坐标
  13.   #--------------------------------------------------------------------------
  14. def screen_x
  15.     # 返回计算后的队伍 X 坐标的排列顺序
  16. case self.index
  17. when 0
  18.    return 330
  19. when 1
  20.    return 390
  21. when 2
  22.    return 450
  23. when 3
  24.    return 510
  25. when 4
  26.    return 570
  27. else
  28.    return 600
  29. end
  30. end
  31.   #--------------------------------------------------------------------------
  32.   # ● 取得战斗画面的 Y 坐标
  33.   #--------------------------------------------------------------------------
  34.   def screen_y
  35.   case self.index
  36. when 0
  37.    return 450
  38. when 1
  39.    return 400
  40. when 2
  41.    return 350
  42. when 3
  43.    return 300
  44. when 4
  45.    return 250
  46.    else
  47.    return 1000
  48. end
  49. end
  50.   #--------------------------------------------------------------------------
  51.   # ● 取得战斗画面的 Z 坐标
  52.   #--------------------------------------------------------------------------
  53. def screen_z
  54. case self.index
  55.   when 0
  56.    return 10
  57.   when 1
  58.    return 9
  59.   when 2
  60.    return 8
  61.   when 3
  62.    return 7
  63.   when 4
  64.    return 6
  65.   else
  66.    return 0
  67.    end
  68.   end
  69. end


  70. #==============================================================================
  71. # ■ Window_Base
  72. #------------------------------------------------------------------------------
  73. #  游戏中全部窗口的超级类。
  74. #==============================================================================

  75. class Window_Base < Window
  76. #--------------------------------------------------------------------------
  77. # ● 描绘 HP
  78. #     actor : 角色
  79. #     x     : 描画目标 X 坐标
  80. #     y     : 描画目标 Y 坐标
  81. #     width : 描画目标的宽
  82. #--------------------------------------------------------------------------
  83. def draw_actor_hp1(actor, x, y, width = 72)
  84.    # 描绘字符串 "HP"
  85.    self.contents.font.color = system_color
  86.    self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
  87.    # 计算描绘 MaxHP 所需的空间
  88.    if width - 24 >= 32
  89.      hp_x = x + 32# + width - 24
  90.    end
  91.    # 描绘 HP
  92.    self.contents.font.color = actor.hp == 0 ? knockout_color :
  93.      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  94.    self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
  95. end
  96. #--------------------------------------------------------------------------
  97. # ● 描绘 SP
  98. #     actor : 角色
  99. #     x     : 描画目标 X 坐标
  100. #     y     : 描画目标 Y 坐标
  101. #     width : 描画目标的宽
  102. #--------------------------------------------------------------------------
  103. def draw_actor_sp1(actor, x, y, width = 72)
  104.    # 描绘字符串 "SP"
  105.    self.contents.font.color = system_color
  106.    self.contents.draw_text(x, y, 24, 24, $data_system.words.sp)
  107.    # 计算描绘 MaxSP 所需的空间
  108.    if width - 24 >= 32
  109.      sp_x = x + 32# + width - 24
  110.    end
  111.    # 描绘 SP
  112.    self.contents.font.color = actor.sp == 0 ? knockout_color :
  113.      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  114.    self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
  115. end
  116. end


  117. #==============================================================================
  118. # ■ Window_BattleStatus
  119. #------------------------------------------------------------------------------
  120. #  显示战斗画面同伴状态的窗口。
  121. #==============================================================================

  122. class Window_BattleStatus < Window_Base
  123. #--------------------------------------------------------------------------
  124. # ● 初始化对像
  125. #--------------------------------------------------------------------------
  126. def initialize
  127.    super(0, 0, 640, 480)
  128.    self.contents = Bitmap.new(width - 32, height - 32)
  129.    self.opacity = 0
  130.    @level_up_flags = [false, false, false, false]
  131.    refresh
  132. end
  133. #--------------------------------------------------------------------------
  134. # ● 释放
  135. #--------------------------------------------------------------------------
  136. def dispose
  137.    super
  138. end
  139. #--------------------------------------------------------------------------
  140. # ● 设置升级标志
  141. #     actor_index : 角色索引
  142. #--------------------------------------------------------------------------
  143. def level_up(actor_index)
  144.    @level_up_flags[actor_index] = true
  145. end
  146. #--------------------------------------------------------------------------
  147. # ● 刷新
  148. #--------------------------------------------------------------------------
  149. def refresh
  150.    self.contents.clear
  151.    @item_max = $game_party.actors.size
  152.     for i in 0...$game_party.actors.size
  153.      actor = $game_party.actors[i]
  154.      case i
  155.        when 0
  156.         x = 310
  157.         y = 400
  158.        when 1
  159.         x = 370
  160.         y = 350
  161.        when 2
  162.         x = 430
  163.         y = 300
  164.        when 3
  165.         x = 490
  166.         y = 250
  167.        when 4
  168.         x = 550
  169.         y = 200
  170.       end
  171.      if @level_up_flags[i]
  172.        self.contents.font.color = normal_color
  173.        self.contents.draw_text(x, y, 80, 24, "升级!")
  174.        Audio.se_play("Audio/SE/cgefc29" , 100, 100)
  175. #       Audio.me_stop
  176. #        Audio.me_play($data_system_level_up_me)
  177.      else
  178.      draw_actor_hp1(actor, x-15, y-15, 80)
  179.      draw_actor_sp1(actor, x-15, y+5, 80)
  180.     end
  181.    end
  182. end

  183. #--------------------------------------------------------------------------
  184. # ● 刷新画面
  185. #--------------------------------------------------------------------------
  186. def update
  187.    super
  188.    # 主界面的不透明度下降
  189.    if $game_temp.battle_main_phase
  190.      self.contents_opacity -= 50 if self.contents_opacity > 1
  191.    else
  192.      self.contents_opacity += 50 if self.contents_opacity < 255
  193.    end
  194. end
  195. end





  196. #==============================================================================
  197. # ■ Window_BattleStatus
  198. #==============================================================================
  199. class Window_BattleStatus < Window_Base
  200. #--------------------------------------------------------------------------
  201. # ● 初始化
  202. #--------------------------------------------------------------------------
  203. alias xrxs_bp2_refresh refresh
  204. def refresh
  205.    xrxs_bp2_refresh
  206.    @item_max = $game_party.actors.size
  207.     for i in 0...$game_party.actors.size
  208.      actor = $game_party.actors[i]
  209.      case i
  210.        when 0
  211.         x = 310
  212.         y = 400
  213.        when 1
  214.         x = 370
  215.         y = 350
  216.        when 2
  217.         x = 430
  218.         y = 300
  219.        when 3
  220.         x = 490
  221.         y = 250
  222.        when 4
  223.         x = 550
  224.         y = 200
  225.       end
  226.      draw_actor_hp_meter(actor, x, y, 50)
  227.      draw_actor_sp_meter(actor, x, y + 8, 50)
  228.    end
  229. end
  230. end
  231. #==============================================================================
  232. # ■ Window_Base
  233. #==============================================================================
  234. class Window_Base < Window
  235. #--------------------------------------------------------------------------
  236. # ● HP描画
  237. #--------------------------------------------------------------------------
  238. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  239.    if type == 1 and actor.hp == 0
  240.      return
  241.    end
  242.    self.contents.font.color = system_color
  243.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
  244.    w = width * actor.hp / actor.maxhp
  245.    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  246.    self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  247.    self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  248.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  249.    
  250.    end
  251. #--------------------------------------------------------------------------
  252. # ● SP描画
  253. #--------------------------------------------------------------------------
  254. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  255.    if type == 1 and actor.hp == 0
  256.      return
  257.    end
  258.    self.contents.font.color = system_color
  259.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  260.    w = width * actor.sp / actor.maxsp
  261.    self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  262.    self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  263.    self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  264.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  265. end
  266. end
复制代码

这里来。谢谢!!!
我的博客:http://golden124.bokee.com

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2006-10-17
帖子
112
2
 楼主| 发表于 2008-5-18 01:58:40 | 只看该作者
我会了{/cy}
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-29 22:47

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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