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

Project1

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

[有事请教] 这个战斗qte脚本,靠装备备注内容判定,我想增加个状态判定

[复制链接]

Lv1.梦旅人

梦石
0
星屑
208
在线时间
38 小时
注册时间
2023-12-2
帖子
9
跳转到指定楼层
1
发表于 2024-1-21 21:04:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
要怎么添加进去呢,就是靠状态判定是否来进行qte或者状态的备注来进行判断qte?
  1. #------------------------------------------------------------------------------#
  2. #  Galv的战斗用QTE限时按钮脚本
  3. #------------------------------------------------------------------------------#
  4. #  用于RPGMAKER VX ACE
  5. #  Version 1.7
  6. #------------------------------------------------------------------------------#
  7. #  2013-04-25 - Version 1.7 - 添加了与Yanfly的投射动画脚本的兼容性。
  8. #  2013-04-17 - Version 1.6 - 修正了战斗结束后的一个比较大的bug
  9. #  2013-04-17 - Version 1.5 - 修正了在Yanfly的战斗脚本中,即使设定必中,
  10. #                           - 仍会弹出闪避的bug
  11. #                           - 添加了对战斗提早结束但指针仍在活跃这一状况的修复
  12. #  2013-04-08 - Version 1.4 - 修正防御指针并未指向正确角色的bug
  13. #  2013-03-15 - Version 1.3 - 修正动画设定
  14. #  2013-03-15 - Version 1.2 - 修正未按下按钮时出现的bug
  15. #  2013-03-15 - Version 1.1 - 增加关闭战斗文字提示的设置方案
  16. #                           - 当角色处于混乱状态时关闭攻击指针
  17. #                           - 修复与Yanfly战斗引擎的兼容bug
  18. #  2013-03-11 - Version 1.0 - 发布
  19. #------------------------------------------------------------------------------#
  20. #  为选中的攻击指令添加一个图形指针,使玩家若在特定时刻按中按钮时激发额外效果。
  21. #  该效果可能是提高伤害、增加防御,增加效果或移除效果。不同类型的攻击可对应
  22. #  不同的按钮和图形,且可设定多种速度与QTE难度。
  23. #
  24. #  注意: 把本脚本插在一些其他战斗用插件脚本下面. 在默认战斗系统和Yanfly的默认
  25. #  战斗引擎脚本下已经测试过,可以兼容。
  26. #
  27. #  还要注意: 若指针消失得太快, 请提高数据库中动画库的对应技能动画的帧数.
  28. #
  29. #------------------------------------------------------------------------------#

  30. #------------------------------------------------------------------------------#
  31. #  在技能或物品的备注中写
  32. #------------------------------------------------------------------------------#
  33. #
  34. #  <btnpress>     # 允许技能使用QTE,并在成功后播放闪光或声效
  35. #      或
  36. #  <btnpress n>   # 允许技能使用QTE,并在成功后播放编号为n的动画
  37. #                 # 这会导致原本的技能动画设定被取消
  38. #
  39. #   # 注意: 对同一技能来说,两个标签只需要写其中一个,不要都写
  40. #
  41. #------------------------------------------------------------------------------#
  42. #  在技能或物品的备注中写(省略部分项目,则被省略的项采用默认设置)
  43. #------------------------------------------------------------------------------#
  44. #
  45. #  <btn x>                 # 设定另一个按钮 (默认:X)
  46. #  <btnmsg x>              # 当成功击中时,用另一个提示编号
  47. #
  48. #  <btnmultiply x>         # 若QTE击中,伤害或治疗值乘以x倍 (默认2)
  49. #
  50. #  <btnstates x,x,x>       # 若QTE击中,则添加id为x的状态
  51. #  <btnrstates x,x,x>      # 若QTE击中,则移除id为x的状态
  52. #
  53. #  <btnopt a,b,c,d>        # a = 开始时间(在指针移动前的准备时刻)
  54. #                          # b = 目标时间(按钮被正确按下的时刻)
  55. #                          # c = 预备使用的指针图像编号
  56. #                          # d = 难度等级. 数字越大越容易击中.
  57. #
  58. #   # 开始时间时,指针出现,并且逐渐缩小以接近目标圈。在目标时间时恰好达到
  59. #   # 目标圈的位置,此时此刻即为玩家应当按下按钮的有效时间。
  60. #   # 默认设定: a = 0   b = 31   c = 1   d = 0
  61. #------------------------------------------------------------------------------#
  62. #  例如:
  63. #
  64. #  <btnpress 4>               # 本技能使用QTE,并在击中后播放编号为4的动画
  65. #  <btn Y>                    # 改用:Y键作为待按下的键 (即键盘上的"s"键)
  66. #  <btnmultiply 3>            # 击中后3倍伤害
  67. #  <btnstates 2,3>            # 击中后目标添加状态库2,3号状态
  68. #  <btnrstates 5,6,7>         # 击中后目标移除状态库5,6,7号状态
  69. #  <btnopt 10,61,2,0>         # 指针活跃时间为第10到第61帧
  70. #                             # 改用2号指针图形;难度不变
  71. #  
  72. #------------------------------------------------------------------------------#

  73. #------------------------------------------------------------------------------#
  74. #  在角色或装备的备注中写 - 这部分用于设置防御QTE
  75. #------------------------------------------------------------------------------#
  76. #
  77. #  <btnpress>     # 允许角色或装备使用防御QTE
  78. #      或
  79. #  <btnpress n>   # 允许角色或装备使用防御QTE,且成功时播放动画库编号为n的动画。
  80. #                 # 若使用横版战斗脚本时,只能采用本条标签。
  81. #                 # 只对技能动画直接落在角色身上的横版战斗脚本起作用。
  82. #
  83. #  # 注意: 某个角色或他当时的装备,只需要有一个填写标签即可,无需同时填写。
  84. #
  85. #------------------------------------------------------------------------------#
  86. #  在角色或装备的备注中写设定(省略部分项目,则被省略的项采用默认设置)
  87. #------------------------------------------------------------------------------#

  88. #  <btn x>                 # 设定另一个按钮 (默认:Z)
  89. #  <btnmsg x>              # 当成功击中时,用另一个提示编号
  90. #
  91. #  <btnmultiply x>         # 若QTE击中,伤害或治疗值乘以x倍 (默认0.5)
  92. #
  93. #  <btnstates x,x,x>       # 若QTE击中,则添加id为x的状态
  94. #  <btnrstates x,x,x>      # 若QTE击中,则添加移除为x的状态
  95. #
  96. #  <btnopt a,b,c,d>        # a = 开始时间(在指针移动前的准备时刻)
  97. #  # 默认设定: a = 0   b = 31   c = 3   d = 0
  98. #
  99. #------------------------------------------------------------------------------#

  100. #($imported ||= {})["Galv_BtnPress_Hit"] = true
  101. #module Galv_BtnAtk

  102. #------------------------------------------------------------------------------#  
  103. #  预备设定
  104. #------------------------------------------------------------------------------#

  105.   #---------------#
  106.   #    参数设定   #
  107.   #---------------#

  108.   #GUARANTEE_HIT = true   # 若玩家QTE成功击中,则打击不可能落空
  109.   #SHOW_AS_CRIT = true    # 对敌伤害显示为暴击伤害

  110.   #ATK_MULTIPLIER = 2     # 击中QTE时的默认伤害倍率为2
  111.   #DEF_MULTIPLIER = 0.5   # 默认防御倍率为0.5

  112.   #DIFFICULTY = 1         # 难度系数:数字越大,被允许判定为成功击中的范围越大
  113.                          # 所以击中QTE就变得越简单
  114.                          # 设置为0的时候是最难的

  115.   #DISABLE_SWITCH = 194   # 打开194号开关以关闭QTE功能

  116.   #ATK_BTN = :X           # 默认的攻击按键:X指的是"a"
  117.   #DEF_BTN = :Z           # 默认的攻击按键:Z指的是"d"

  118.   #Y_OFFSET = -50         # 设置QTE图像的Y坐标的位置,默认为-50.
  119.                          # 0的位置设置在战斗人员的底部。

  120.   #Y_FRONT_OFFSET = 0     # 当你使用未设定己方角色x,y坐标的战斗系统时,
  121.   #X_FRONT_OFFSET = 0     # 针对以你的队伍为目标的攻击,设置QTE图像的X和Y坐标
  122.                          # 默认情况下它的中心在战斗状态窗口的顶端.

  123.   #---------------#
  124.   #    词汇库     #
  125.   #---------------#

  126.   #BATTLE_LOG_TXT = true      # 是否显示以下的战斗文字说明(写true或false)
  127.                              # 本功能导致某些战斗脚本中的多段攻击技能变慢。

  128.   # 以下是战斗场合中,QTE成功击中时可能显示的语句。
  129.   #TXT = [ # 不要碰

  130.       #"打得漂亮!",    # 0) 默认的打击QTE成功时的信息
  131.      # "效果拔群!",    # 1) 默认的魔法QTE成功时的信息
  132.      # "不动如山!",    # 2) 默认的防御QTE成功时的信息

  133.       #"举例试试!",    # 3) 如果你标注了<btnmsg 3>这个标签

  134.       #"啧",          # 4) 其实你在这里高兴加点什么就加点什么
  135.       #"爆树",        # 5) 其实你在这里高兴加点什么就加点什么
  136.       #"问黄薯片",    # 6) 其实你在这里高兴加点什么就加点什么
  137.       #"6",           # 7) 其实你在这里高兴加点什么就加点什么

  138. # ] # 不要碰

  139.   #---------------#
  140.   #     图 像     #
  141.   #---------------#

  142. # TARGET_IMG = "hit_target"         # 指针内圈的命名前缀,作为目标出现
  143. # INDICATOR_IMG = "hit_indicator"   # 指针外圈的命名前缀,外圈缩小以贴近内圈
  144. #
  145.   # 注意: 这些是图像文件名的前缀,后门应当跟着数字编号。默认编号是1.
  146.   # 所以默认文件名也应该分别写作"hit_target1.png"和"hit_indicator1.png"
  147.   # 若想要使用其他图像,则添加后缀2,3等别的数字的图像,当然技能栏备注也要相应修改.
  148.   # 这些图像都放在文件夹/Graphics/System/下.

  149. #  COLOR_HIT = [0, 255, 0]    # [R,G,B] 成功击中时指针变成何种颜色
  150. #  COLOR_MISS = [255, 0, 0]   # [R,G,B] 未击中时指针变成何种颜色


  151.   #---------------#
  152.   #    声 音      #
  153.   #---------------#
  154. # SE_HIT = ["Flash1",100,100]    # 当QTE成功击中时的"声效文件名", 音量, 频率
  155. #  SE_MISS = ["Buzzer1",85,100]   # 当QTE未击中时的"声效文件名", 音量, 频率


  156. #------------------------------------------------------------------------------#  
  157. #  预备设定到此为止
  158. #------------------------------------------------------------------------------#

  159. #end


  160. class RPG::BaseItem
  161.   def btnpress
  162.     if @btnpress.nil?
  163.       if @note =~ /<btnpress>/i
  164.         @btnpress = 0
  165.       elsif @note =~ /<btnpress[ ](.*)>/i
  166.         @btnpress = $1.to_i
  167.       else
  168.         @btnpress = -1
  169.       end
  170.     end
  171.     @btnpress
  172.   end
  173.   def btnmultiply
  174.     if @btnmultiply.nil?
  175.       if @note =~ /<btnmultiply[ ](.*)>/i
  176.         @btnmultiply = $1.to_f
  177.       else
  178.         if self.is_a?(RPG::Actor) || self.is_a?(RPG::EquipItem)
  179.           @btnmultiply = Galv_BtnAtk::DEF_MULTIPLIER
  180.         else
  181.           @btnmultiply = Galv_BtnAtk::ATK_MULTIPLIER
  182.         end
  183.       end
  184.     end
  185.     @btnmultiply
  186.   end
  187.   def btn
  188.     if @btn.nil?
  189.       if @note =~ /<btn[ ](.*)>/i
  190.         @btn = $1.to_sym
  191.       else
  192.         if self.is_a?(RPG::Actor) || self.is_a?(RPG::EquipItem)
  193.           @btn = Galv_BtnAtk::DEF_BTN
  194.         else
  195.           @btn = Galv_BtnAtk::ATK_BTN
  196.         end
  197.       end
  198.     end
  199.     @btn
  200.   end
  201.   def btnmsg
  202.     if @btnmsg.nil?
  203.       if @note =~ /<btnmsg[ ](.*)>/i
  204.         @btnmsg = $1.to_i
  205.       else
  206.         @btnmsg = nil
  207.       end
  208.     end
  209.     @btnmsg
  210.   end
  211.   def btnstates
  212.     if @btnstates.nil?
  213.       if @note =~ /<btnstates[ ](.*)>/i
  214.         @btnstates = $1.to_s.split(",").map {|i| i.to_i}
  215.       else
  216.         @btnstates = []
  217.       end
  218.     end
  219.     @btnstates
  220.   end
  221.   def btnrstates
  222.     if @btnrstates.nil?
  223.       if @note =~ /<btnrstates[ ](.*)>/i
  224.         @btnrstates = $1.to_s.split(",").map {|i| i.to_i}
  225.       else
  226.         @btnrstates = []
  227.       end
  228.     end
  229.     @btnrstates
  230.   end
  231.   def btnopt
  232.     if @btnopt.nil?
  233.       if @note =~ /<btnopt[ ](.*)>/i
  234.         @btnopt = $1.to_s.split(",").map {|i| i.to_i}
  235.       else
  236.         if self.is_a?(RPG::Actor) || self.is_a?(RPG::EquipItem)
  237.           @btnopt = [0,31,3,0]
  238.         else
  239.           @btnopt = [0,31,1,0]
  240.         end
  241.       end
  242.     end
  243.     @btnopt
  244.   end
  245. end # RPG::BaseItem


  246. class Game_Temp
  247.   attr_accessor :btncrit
  248.   attr_accessor :btndata
  249.   alias galv_btnhit_gt_initialize initialize
  250.   def initialize
  251.     galv_btnhit_gt_initialize
  252.     @btncrit = false
  253.     @btndata = [2,nil]  # [multipler,vocab]
  254.   end
  255. end # Game_Temp


  256. class Game_Actor < Game_Battler
  257.   if !$imported["YEA-BattleEngine"]
  258.     attr_accessor :screen_x
  259.     attr_accessor :screen_y
  260.   end
  261. end # Game_Actor < Game_Battler


  262. class Game_ActionResult
  263.   # Cannot miss if hit button at right time
  264.   alias galv_btnhit_gar_hit? hit?
  265.   def hit?
  266.     if $game_temp.btncrit && Galv_BtnAtk::GUARANTEE_HIT
  267.       @missed = false
  268.       @evaded = false
  269.       @used
  270.     else
  271.       galv_btnhit_gar_hit?
  272.     end
  273.   end
  274.   
  275.   # Modify damage if button is hit and make it show critical
  276.   alias galv_btnhit_gar_make_damage make_damage
  277.   def make_damage(value, item)
  278.     if $game_temp.btncrit
  279.       value = (value * $game_temp.btndata[0]).to_i
  280.       @critical = true if @battler.is_a?(Game_Enemy) && Galv_BtnAtk::SHOW_AS_CRIT
  281.     end
  282.     galv_btnhit_gar_make_damage(value, item)
  283.   end
  284.   
  285. end # Game_ActionResult


  286. class Window_BattleLog < Window_Selectable
  287.   alias galv_btnhit_wblog_display_critical display_critical
  288.   def display_critical(target, item)
  289.     if $game_temp.btncrit && Galv_BtnAtk::BATTLE_LOG_TXT
  290.       if $game_temp.btndata[1]
  291.         text = $game_temp.btndata[1]
  292.       else
  293.         text = target.actor? ? Galv_BtnAtk::TXT[1] : Galv_BtnAtk::TXT[0]
  294.       end
  295.       add_text(text)
  296.       wait
  297.     else
  298.       galv_btnhit_wblog_display_critical(target, item)
  299.     end
  300.   end
  301. end # Window_BattleLog < Window_Selectable


  302. class Scene_Battle < Scene_Base
  303.   attr_accessor :btnactive
  304.   
  305.   alias galv_btnhit_sb_update_basic update_basic
  306.   def update_basic
  307.     if @btnactive
  308.       btn_pressed
  309.       @hit_indicator.update if @hit_indicator
  310.     end
  311.     galv_btnhit_sb_update_basic
  312.   end
  313.   
  314.   def hskill
  315.     if @def_opts
  316.       @def_opts
  317.     else
  318.       @subject.current_action.item
  319.     end
  320.   end
  321.   
  322.   def btn_pressed
  323.     return if $game_switches[Galv_BtnAtk::DISABLE_SWITCH] || $game_troop.all_dead?
  324.     if Input.trigger?(hskill.btn) && @hit_indicator.hit?
  325.       $game_temp.btncrit = true
  326.       $game_temp.btndata[0] = hskill.btnmultiply
  327.       btn_addstate if hskill.btnstates
  328.       btn_remstate if hskill.btnrstates
  329.       @hit_indicator.success
  330.       if hskill.btnpress > 0
  331.         show_hit_success_anim(@current_inditargets, hskill.btnpress)
  332.       else
  333.         $game_troop.screen.start_flash(Color.new(255,255,255,255),25)
  334.         RPG::SE.new(Galv_BtnAtk::SE_HIT[0],Galv_BtnAtk::SE_HIT[1],Galv_BtnAtk::SE_HIT[2]).play
  335.       end
  336.       @btnactive = nil
  337.     elsif Input.trigger?(hskill.btn)
  338.       $game_temp.btncrit = false
  339.       @hit_indicator.fail
  340.       RPG::SE.new(Galv_BtnAtk::SE_MISS[0],Galv_BtnAtk::SE_MISS[1],Galv_BtnAtk::SE_MISS[2]).play
  341.       @btnactive = nil
  342.     end
  343.   end
  344.   
  345.   def btn_addstate
  346.     @current_inditargets.each { |t|
  347.       already_dead = t.dead?
  348.       hskill.btnstates.each { |state| t.add_state(state) if !already_dead }
  349.       t.perform_collapse_effect if t.dead? && !already_dead
  350.     }
  351.   end
  352.   
  353.   def btn_remstate
  354.     @current_inditargets.each { |t|
  355.       already_dead = t.dead?
  356.       hskill.btnrstates.each { |state| t.remove_state(state) }
  357.       t.perform_collapse_effect if t.dead? && !already_dead
  358.     }
  359.   end
  360.   
  361.   def show_hit_success_anim(targets, animation_id, mirror = false)
  362.     if $data_animations[animation_id]
  363.       targets[0].animation_id = animation_id
  364.       targets[0].animation_mirror = mirror
  365.     end
  366.   end
  367.   
  368.   alias galv_btnhit_sb_use_item use_item
  369.   def use_item
  370.     galv_btnhit_sb_use_item
  371.     $game_temp.btncrit = false
  372.   end
  373.   
  374.   def do_indicator(targets)
  375.     return if targets.nil? || targets.empty? || @castanim
  376.     @def_opts = nil
  377.     item = @subject.current_action.item
  378.     target = targets[0]
  379.     if @subject.is_a?(Game_Actor) && [email protected]? && item.btnpress >= 0
  380.       $game_temp.btndata[1] = item.btnmsg ? Galv_BtnAtk::TXT[item.btnmsg] : nil
  381.       @current_inditargets = targets
  382.       setup_hit_indicator(item.btnopt)
  383.       @btnactive = true
  384.     elsif target && defender?(target)
  385.       $game_temp.btndata[1] = @def_opts.btnmsg ?
  386.           Galv_BtnAtk::TXT[@def_opts.btnmsg] : Galv_BtnAtk::TXT[2]
  387.       @current_inditargets = targets
  388.       setup_hit_indicator(@def_opts.btnopt)
  389.       @btnactive = true
  390.     end
  391.     update_for_wait
  392.   end
  393.   
  394.   alias galv_btnhit_sb_show_animation show_animation
  395.   def show_animation(targets, animation_id)
  396.     do_indicator(targets)
  397.     galv_btnhit_sb_show_animation(targets, animation_id)
  398.   end
  399.   
  400.   def defender?(target)
  401.     return false if !target.is_a?(Game_Actor)
  402.     return false if @subject.is_a?(Game_Actor)
  403.     defend = -1
  404.     defend = $data_actors[target.id].btnpress
  405.     @def_opts = $data_actors[target.id]
  406.     target.equips.each { |i|
  407.     next if i.nil?
  408.     if i.btnpress > defend
  409.       defend = i.btnpress
  410.       @def_opts = i
  411.     end
  412.     }
  413.     return true if defend >= 0
  414.   end
  415.   
  416.   def setup_hit_indicator(array)
  417.     return if @current_inditargets[0].nil? ||
  418.       $game_switches[Galv_BtnAtk::DISABLE_SWITCH] || $game_troop.all_dead?
  419.       
  420.     if !@current_inditargets.empty? && @current_inditargets[0].screen_x
  421.       x = @current_inditargets[0].screen_x
  422.       y = @current_inditargets[0].screen_y + Galv_BtnAtk::Y_OFFSET
  423.     else
  424.       x = Graphics.width / 2 + Galv_BtnAtk::X_FRONT_OFFSET
  425.       y = Graphics.width / 1.7 + Galv_BtnAtk::Y_FRONT_OFFSET
  426.     end
  427.     @hit_indicator = Timed_Hits.new(x,y,array)
  428.   end
  429.   
  430.   alias galv_btnhit_sb_invoke_item invoke_item
  431.   def invoke_item(target, item)
  432.     if !$imported["YEA-BattleEngine"]
  433.       @btnactive = nil
  434.       @hit_indicator.dispose if @hit_indicator
  435.     end
  436.     galv_btnhit_sb_invoke_item(target, item)
  437.     if $imported["YEA-BattleEngine"]
  438.       @btnactive = nil
  439.       @hit_indicator.dispose if @hit_indicator
  440.     end
  441.   end
  442.   
  443.   alias galv_btnhit_sb_terminate terminate
  444.   def terminate
  445.     galv_btnhit_sb_terminate
  446.     @hit_indicator.dispose if @hit_indicator
  447.   end
  448.   
  449.   if $imported["YEA-CastAnimations"]
  450.     alias galv_btnhit_sb_process_casting_animation process_casting_animation
  451.     def process_casting_animation
  452.       @castanim = true
  453.       item = @subject.current_action.item
  454.       cast_ani = item.cast_ani
  455.       return if cast_ani <= 0
  456.       show_animation([@subject], cast_ani)
  457.       @castanim = false
  458.     end
  459.   end
  460.   
  461. end # Scene_Battle < Scene_Base


  462. #------------------------------------------------------------------------------#
  463. #  Class Timed_Hits
  464. #------------------------------------------------------------------------------#
  465. class Timed_Hits
  466.   def initialize(x,y,options)
  467.     @x = x
  468.     @y = y
  469.     @opt = options
  470.     @img = @opt[2].to_s
  471.     @start_frame = @opt[0]
  472.     @target_frame = @opt[1]
  473.     @current_frame = 0
  474.     @s = (3.to_f - 0.6) / (@target_frame - @start_frame)
  475.     @d = (Galv_BtnAtk::DIFFICULTY + @opt[3]).to_f * 0.5
  476.     create_hit_indicator
  477.     create_target_indicator
  478.   end
  479.   
  480.   def create_target_indicator
  481.     @hittarget = Sprite.new(@viewport1)
  482.     @hittarget.bitmap = Cache.system(Galv_BtnAtk::TARGET_IMG + @img)
  483.     @hittarget.z = 100
  484.     @hittarget.x = @x - (@hittarget.bitmap.width / 2)
  485.     @hittarget.y = @y - (@hittarget.bitmap.height / 2)
  486.     @hittarget.opacity = 130
  487.   end

  488.   def create_hit_indicator
  489.     @hitindi = Sprite.new(@viewport1)
  490.     @hitindi.bitmap = Cache.system(Galv_BtnAtk::INDICATOR_IMG + @img)
  491.     @hitindi.x = @x
  492.     @hitindi.y = @y
  493.     @hitindi.z = 100
  494.     @hitindi.opacity = 0
  495.     @hitindi.zoom_x = 3
  496.     @hitindi.zoom_y = 3
  497.     @hitindi.color = Color.new(0, 0, 0, 0)
  498.   end
  499.   
  500.   def hit?
  501.     @current_frame.between?(@target_frame - @d,@target_frame + @d)
  502.   end
  503.   
  504.   def success
  505.     c = Galv_BtnAtk::COLOR_HIT
  506.     @hitindi.color = Color.new(c[0],c[1],c[2],255)
  507.   end

  508.   def fail
  509.     c = Galv_BtnAtk::COLOR_MISS
  510.     @hitindi.color = Color.new(c[0],c[1],c[2],255)
  511.   end
  512.   
  513.   def update
  514.     update_indicators
  515.   end
  516.   
  517.   def update_indicators
  518.     return @current_frame += 1 if @current_frame < @start_frame
  519.     @hitindi.opacity = 100
  520.     @hitindi.zoom_x -= @s
  521.     @hitindi.zoom_y -= @s
  522.     @hitindi.x = @x - (@hitindi.bitmap.width / 2) * @hitindi.zoom_x
  523.     @hitindi.y = @y - (@hitindi.bitmap.height / 2) * @hitindi.zoom_y
  524.     @current_frame += 1
  525.     if @hitindi.zoom_x <= 0
  526.       fail
  527.       SceneManager.scene.btnactive = nil
  528.     end
  529.   end
  530.   
  531.   def dispose
  532.     @hitindi.dispose if @hitindi
  533.     @hittarget.dispose if @hittarget
  534.   end
  535. end # Timed_Hits
复制代码
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-4-28 01:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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