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

Project1

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

[已经过期] 关于一个固定图片脚本的问题

[复制链接]

Lv2.观梦者

梦石
0
星屑
387
在线时间
51 小时
注册时间
2018-1-25
帖子
32
跳转到指定楼层
1
发表于 2020-1-20 21:38:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
由于要做灯光,所以要把灯光的光源的图片固定在地图上,于是我搜索找到了大佬的固定图片脚本,可以把图片固定在事件处( 不能用事件行走图做,半透明感觉做不出来,而且不止一个格子),这个脚本确实可以把图片固定事件处,用的picture_position(图片ID, 事件ID)这个命令,但是一进场会感觉图片像是从某个地方飞过来到我所指定的事件处,而不是简单直接固定在事件处,有没有大佬看看是什么原因,有办法解决吗,脚本如下,可以随便找一个图片尝试一下,大多数情况下大概会出现我所说的情况(我对图片的设置是直接指定x=0,y=0,左上还是中心都是一样的)

如图就感觉进场时好像从1位置飞到了2位置,然后马上固定在了2的位置,图中的1是我p上去的,实际上进场飞过去以后图片会固定在2的位置,但是飞过去的感觉实在太明显了,实在无法忽视……
脚本如下:

  1. #==============================================================================
  2. # +++ MOG - 图片效果 (v1.0) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # https://atelierrgss.wordpress.com/
  6. #==============================================================================
  7. # 本脚本添加了一些图片的表现效果,其复杂而高效。同时还可以设定图片的位置是相对
  8. # 画面还是事件的。
  9. #==============================================================================
  10. # 效果类型
  11. #==============================================================================
  12. # 0 - 震动 A
  13. # 1 - 震动 B
  14. # 2 - 呼吸
  15. # 3 - 循环放大缩小
  16. # 4 - 循环淡入淡出
  17. # 5 - 滚动(朝两个方向)
  18. # 6 - 波动
  19. # 7 - 一帧帧播放的,类似GIF的动画效果(下面有解释)
  20. #
  21. # 你可以对一张图片同时使用多个甚至全部效果.
  22. #
  23. #==============================================================================
  24. # 使用方法
  25. #==============================================================================
  26. # 在事件中使用脚本:
  27. #
  28. # picture_effect(图片ID,效果类型,强度,速度)
  29. #
  30. # 图片ID = 应用效果的图片的ID
  31. # 效果类型 = 效果的类型(0 到 7)
  32. # 强度 = 效果的强度
  33. # SPEED = 效果的速度
  34. #
  35. # 例子:
  36. #
  37. # picture_effect(1,5,10,50)
  38. #
  39. #==============================================================================
  40. # 按帧播放的效果. (效果类型7)
  41. #==============================================================================
  42. # 需要以此规律命名播放的图片。
  43. #
  44. # Picture_Name.png  
  45. # Picture_Name0.png
  46. # Picture_Name1.png
  47. # Picture_Name2.png
  48. # Picture_Name3.png
  49. # Picture_Name4.png
  50. # ...
  51. #
  52. #==============================================================================
  53. # 图片特殊位置
  54. #==============================================================================
  55. # 设置图片特殊位置的脚本:
  56. #
  57. # picture_position(图片ID, 目标ID)
  58. #
  59. # 其中目标ID有以下选择:
  60. #
  61. # 0        = 普通位置
  62. # 1..999   = 事件处 (ID).
  63. # -1       = 玩家处.
  64. # -2       = 固定.
  65. #
  66. #==============================================================================
  67. # 消除图片
  68. #==============================================================================
  69. # 你可以通过事件指令"消除图片"或以下脚本来消除图片:
  70. #
  71. # picture_effects_clear(图片ID)
  72. #
  73. #==============================================================================
  74. module MOG_PICURE_EFFECTS
  75.   # 设置图片的默认Z坐标.
  76.   # 在游戏过程中也可以使用脚本"set_picture_z(数值)"来改变图片的Z坐标
  77.   DEFAULT_SCREEN_Z = 100
  78. end

  79. $imported = {} if $imported.nil?
  80. $imported[:mog_picture_effects] = true

  81. #==============================================================================
  82. # ■ Game Picture
  83. #==============================================================================
  84. class Game_Picture
  85.   attr_accessor :effect_ex
  86.   attr_accessor :anime_frames
  87.   attr_accessor :position
  88.   
  89.   #--------------------------------------------------------------------------
  90.   # ● Init Basic
  91.   #--------------------------------------------------------------------------
  92.   alias mog_picture_ex_init_basic init_basic
  93.   def init_basic
  94.       init_effect_ex
  95.       mog_picture_ex_init_basic
  96.   end

  97.   #--------------------------------------------------------------------------
  98.   # ● Erase
  99.   #--------------------------------------------------------------------------
  100.   alias mog_picture_ex_erase erase
  101.   def erase
  102.       init_effect_ex
  103.       mog_picture_ex_erase
  104.   end

  105.   #--------------------------------------------------------------------------
  106.   # ● Init Effect EX
  107.   #--------------------------------------------------------------------------
  108.   def init_effect_ex
  109.       @effect_ex = [] ; @anime_frames = [] ; @position = [0,nil,0,0]
  110.   end
  111.    
  112. end

  113. #==============================================================================
  114. # ■ Game System
  115. #==============================================================================
  116. class Game_System
  117.   attr_accessor :picture_screen_z

  118.   #--------------------------------------------------------------------------
  119.   # ● Initialize
  120.   #--------------------------------------------------------------------------
  121.   alias mog_picture_ex_initialize initialize
  122.   def initialize
  123.       @picture_screen_z = MOG_PICURE_EFFECTS::DEFAULT_SCREEN_Z
  124.       mog_picture_ex_initialize      
  125.   end
  126.   
  127. end

  128. #==============================================================================
  129. # ■ Game Interpreter
  130. #==============================================================================
  131. class Game_Interpreter

  132.   #--------------------------------------------------------------------------
  133.   # ● Set Pictures
  134.   #--------------------------------------------------------------------------
  135.   def set_pictures
  136.       return $game_troop.screen.pictures if SceneManager.scene_is?(Scene_Battle)
  137.       return $game_map.screen.pictures if SceneManager.scene_is?(Scene_Map)
  138.   end  

  139.   #--------------------------------------------------------------------------
  140.   # ● Picture Effect
  141.   #--------------------------------------------------------------------------
  142.   def picture_effect(id,type, power = nil,speed = nil,misc = nil)
  143.       pictures = set_pictures
  144.       return if pictures.nil?
  145.       power = set_standard_power(type) if power == nil
  146.       power = 1 if type == 4 and power < 1
  147.       speed = set_standard_speed(type) if speed == nil
  148.       pictures[id].effect_ex[0] = nil if type == 1
  149.       pictures[id].effect_ex[1] = nil if type == 0
  150.       pictures[id].effect_ex[type] = [power,speed,0]
  151.       pictures[id].effect_ex[type] = [0,0,0,power * 0.00005,speed, 0,0] if [2,3].include?(type)
  152.       pictures[id].effect_ex[type] = [255,0,0,255 / power, power,speed,0] if type == 4
  153.       pictures[id].effect_ex[type] = [0,0,power,speed,0] if type == 5
  154.       pictures[id].effect_ex[type] = [true,power * 10,speed * 100] if type == 6   
  155.       pictures[id].anime_frames = [true,[],power,0,0,speed,0] if type == 7
  156.   end

  157.   #--------------------------------------------------------------------------
  158.   # ● Set Standard Power
  159.   #--------------------------------------------------------------------------
  160.   def set_standard_power(type)
  161.       return 6   if type == 2
  162.       return 30  if type == 3
  163.       return 120 if type == 4
  164.       return 10
  165.   end   
  166.   
  167.   #--------------------------------------------------------------------------
  168.   # ● Set Standard Speed
  169.   #--------------------------------------------------------------------------
  170.   def set_standard_speed(type)
  171.       return 3 if [0,1].include?(type)
  172.       return 0 if [2,3,4].include?(type)
  173.       return 2 if type == 5
  174.       return 0 if type == 7
  175.       return 10
  176.   end  
  177.    
  178.   #--------------------------------------------------------------------------
  179.   # ● Picture Position
  180.   #--------------------------------------------------------------------------
  181.   def picture_position(id,target_id)
  182.       pictures = set_pictures
  183.       return if pictures.nil?
  184.       pictures[id].position = [0,nil,0,0] if [-2,0].include?(pictures[id].position[0])
  185.       pictures[id].effect_ex.clear
  186.       target = 0 ; target = $game_player if target_id == -1
  187.       if target_id > 0
  188.       $game_map.events.values.each do |e| target = e if e.id == target_id end
  189.       end
  190.       pictures[id].position[0] = target_id
  191.       pictures[id].position[1] = target
  192.   end  

  193.   #--------------------------------------------------------------------------
  194.   # ● Set Picture Z
  195.   #--------------------------------------------------------------------------
  196.   def set_picture_z(value)
  197.       $game_system.picture_screen_z = value
  198.   end
  199.    
  200.   #--------------------------------------------------------------------------
  201.   # ● Picture Effects Clear
  202.   #--------------------------------------------------------------------------
  203.   def picture_effects_clear(id)
  204.       pictures = set_pictures
  205.       return if pictures.nil?
  206.       pictures[id].effect_ex.clear ; pictures[id].anime_frames.clear
  207.       pictures[id].position = [0,nil,0,0]
  208.   end   
  209.   
  210. end

  211. #==============================================================================
  212. # ■ Game Map
  213. #==============================================================================
  214. class Game_Map
  215.   
  216.   #--------------------------------------------------------------------------
  217.   # ● Setup
  218.   #--------------------------------------------------------------------------
  219.   alias mog_picture_ex_setup setup
  220.   def setup(map_id)
  221.       mog_picture_ex_setup(map_id)
  222.       clear_picture_position rescue  nil
  223.   end
  224.   
  225.   #--------------------------------------------------------------------------
  226.   # ● Clear Picture Position
  227.   #--------------------------------------------------------------------------
  228.   def clear_picture_position
  229.       pictures = $game_troop.screen.pictures if SceneManager.scene_is?(Scene_Battle)
  230.       pictures = $game_map.screen.pictures if SceneManager.scene_is?(Scene_Map)
  231.       return if pictures == nil
  232.       pictures.each {|p|
  233.       p.position = [-1000,nil,0,0] if p.position[0] > 0 or p.position[1] == nil}   
  234.   end
  235.   
  236. end

  237. #==============================================================================
  238. # ■ Sprite Picture
  239. #==============================================================================
  240. class Sprite_Picture < Sprite  
  241.   
  242.   #--------------------------------------------------------------------------
  243.   # ● Dispose
  244.   #--------------------------------------------------------------------------
  245.   alias mog_picture_ex_dispose dispose
  246.   def dispose
  247.       mog_picture_ex_dispose
  248.       @picture.effect_ex[6][0] = true if @picture.effect_ex[6]
  249.       @picture.anime_frames[0] = true if @picture.effect_ex[7]
  250.       dispose_pic_frames if [email protected]_ex[7]
  251.   end  
  252.   
  253.   #--------------------------------------------------------------------------
  254.   # ● Dispose Pic Frames
  255.   #--------------------------------------------------------------------------
  256.   def dispose_pic_frames
  257.       return if @pic_frames.nil?
  258.       @pic_frames.each {|picture| picture.dispose } ; @pic_frames = nil
  259.   end
  260.   
  261.   #--------------------------------------------------------------------------
  262.   # ● Update Bitmap
  263.   #--------------------------------------------------------------------------
  264.   alias mog_picture_ex_update_bitmap update_bitmap
  265.   def update_bitmap
  266.       refresh_effect_ex if @old_name_ex != @picture.name
  267.       if [email protected]_frames.empty? and self.bitmap
  268.          update_picture_animation ; return
  269.       end
  270.       mog_picture_ex_update_bitmap
  271.       create_picture_animation if can_create_frame_picture?
  272.       set_wave_effect if can_set_wave_effect?
  273.   end

  274.   #--------------------------------------------------------------------------
  275.   # ● Refresh effect EX
  276.   #--------------------------------------------------------------------------
  277.   def refresh_effect_ex
  278.      (self.wave_amp = 0 ; self.wave_length = 1 ; self.wave_speed = 0) if [email protected]_ex[6]
  279.       @old_name_ex = @picture.name
  280.       create_picture_animation if @picture.effect_ex[7]
  281.       set_wave_effect if can_set_wave_effect?
  282.   end
  283.   
  284.   #--------------------------------------------------------------------------
  285.   # ● Can Create Frame Picture
  286.   #--------------------------------------------------------------------------
  287.   def can_create_frame_picture?
  288.       return false if [email protected]_frames[0]
  289.       return false if !self.bitmap
  290.       return true
  291.   end
  292.   
  293.   #--------------------------------------------------------------------------
  294.   # ● Update Picture Animation
  295.   #--------------------------------------------------------------------------
  296.   def update_picture_animation
  297.       return if @pic_frames == nil
  298.       if @picture.anime_frames[6] > 0 ; @picture.anime_frames[6] -= 1 ; return
  299.       end
  300.       @picture.anime_frames[4] += 1
  301.       return if @picture.anime_frames[4] < @picture.anime_frames[2]
  302.       self.bitmap = @pic_frames[@picture.anime_frames[3]]
  303.       @picture.anime_frames[4] = 0 ; @picture.anime_frames[3] += 1
  304.       if @picture.anime_frames[3] >= @pic_frames.size  
  305.          @picture.anime_frames[3] = 0 ; @picture.anime_frames[6] = @picture.anime_frames[5]
  306.       end   
  307.   end  
  308.   
  309.   #--------------------------------------------------------------------------
  310.   # ● Create Picture Animation
  311.   #--------------------------------------------------------------------------
  312.   def create_picture_animation
  313.       dispose_pic_frames ; @pic_frames = [] ; @picture.anime_frames[0] = false     
  314.       for index in 0...999
  315.           @pic_frames.push(Cache.picture(@picture.name + index.to_s)) rescue nil
  316.           break if @pic_frames[index] == nil
  317.       end
  318.       if @pic_frames.size <= 1
  319.          dispose_pic_frames ; @pic_frames = nil ; @picture.anime_frames.clear
  320.          @picture.effect_ex[7] = nil ; return
  321.       end  
  322.       self.bitmap = @pic_frames[@picture.anime_frames[3]]
  323.       update_picture_animation
  324.   end
  325.   
  326.   #--------------------------------------------------------------------------
  327.   # ● Update Position
  328.   #--------------------------------------------------------------------------
  329.   def update_position      
  330.       self.z = @picture.number + $game_system.picture_screen_z
  331.       if @picture.effect_ex[0] ; update_shake_effect(0) ; return ; end
  332.       if @picture.effect_ex[1] ; update_shake_effect(1) ; return ; end  
  333.       self.x = pos_x ; self.y = pos_y ; set_oxy_correction      
  334.   end

  335.   #--------------------------------------------------------------------------
  336.   # ● Pos X
  337.   #--------------------------------------------------------------------------
  338.   def pos_x
  339.       return @picture.x
  340.   end
  341.   
  342.   #--------------------------------------------------------------------------
  343.   # ● Pos Y
  344.   #--------------------------------------------------------------------------
  345.   def pos_y
  346.       return @picture.y
  347.   end

  348.   #--------------------------------------------------------------------------
  349.   # ● Set Oxy Correction
  350.   #--------------------------------------------------------------------------
  351.   def set_oxy_correction
  352.       return if @picture.position[0] == -2
  353.       self.x += self.ox if @picture.effect_ex[3] or @picture.effect_ex[5]
  354.       self.y += self.oy if @picture.effect_ex[2] or @picture.effect_ex[3] or @picture.effect_ex[5]
  355.   end
  356.   
  357.   #--------------------------------------------------------------------------
  358.   # ● Update Position
  359.   #--------------------------------------------------------------------------
  360.   def update_shake_effect(type)
  361.       @picture.effect_ex[type][2] += 1
  362.       return if @picture.effect_ex[type][2] < @picture.effect_ex[type][1]
  363.       @picture.effect_ex[type][2] = 0
  364.       self.x = pos_x + shake_effect(type)
  365.       self.y = @picture.effect_ex[1] ? pos_y + shake_effect(type) : pos_y
  366.       set_oxy_correction
  367.   end

  368.   #--------------------------------------------------------------------------
  369.   # ● Shake Effect
  370.   #--------------------------------------------------------------------------
  371.   def shake_effect(type)
  372.       -(@picture.effect_ex[type][0] / 2) +  rand(@picture.effect_ex[type][0])
  373.   end

  374.   #--------------------------------------------------------------------------
  375.   # ● Update Other
  376.   #--------------------------------------------------------------------------
  377.   def update_other
  378.       if @picture.effect_ex[4] ; update_opacity_ex
  379.       else ; self.opacity = @picture.opacity
  380.       end
  381.       self.blend_type = @picture.blend_type
  382.       if @picture.effect_ex[5] ; update_angle_ex
  383.       else ; self.angle = @picture.angle
  384.       end   
  385.       self.tone.set(@picture.tone)
  386.   end  

  387.   #--------------------------------------------------------------------------
  388.   # ● Update Angle EX
  389.   #--------------------------------------------------------------------------
  390.   def update_angle_ex
  391.       @picture.effect_ex[5][4] += 1
  392.       return if @picture.effect_ex[5][4] < @picture.effect_ex[5][3]
  393.       @picture.effect_ex[5][4] = 0 ; @picture.effect_ex[5][1] += 1
  394.       case @picture.effect_ex[5][1]
  395.         when [email protected]_ex[5][2]
  396.              @picture.effect_ex[5][0] += 1
  397.         when @picture.effect_ex[5][2]..(@picture.effect_ex[5][2] * 3)
  398.              @picture.effect_ex[5][0] -= 1
  399.         when (@picture.effect_ex[5][2] * 3)..(-1 + @picture.effect_ex[5][2] * 4)
  400.              @picture.effect_ex[5][0] += 1
  401.         else ; @picture.effect_ex[5][0] = 0 ; @picture.effect_ex[5][1] = 0
  402.       end
  403.       self.angle = @picture.angle + @picture.effect_ex[5][0]
  404.   end
  405.   
  406.   #--------------------------------------------------------------------------
  407.   # ● Update Opacity EX
  408.   #--------------------------------------------------------------------------
  409.   def update_opacity_ex
  410.       @picture.effect_ex[4][6] += 1
  411.       return if @picture.effect_ex[4][6] < @picture.effect_ex[4][5]
  412.       @picture.effect_ex[4][6] = 0 ; @picture.effect_ex[4][2] += 1
  413.       case @picture.effect_ex[4][2]
  414.         when [email protected]_ex[4][4]
  415.           @picture.effect_ex[4][0] -= @picture.effect_ex[4][3]
  416.         when @picture.effect_ex[4][4]..(-1 + @picture.effect_ex[4][4] * 2)
  417.           @picture.effect_ex[4][0] += @picture.effect_ex[4][3]         
  418.         else
  419.           @picture.effect_ex[4][0] = 255 ; @picture.effect_ex[4][2] = 0
  420.       end
  421.       self.opacity = @picture.effect_ex[4][0]
  422.   end
  423.   
  424.   #--------------------------------------------------------------------------
  425.   # ● Update Origin
  426.   #--------------------------------------------------------------------------
  427.   def update_origin
  428.       return if !self.bitmap
  429.       if force_center_oxy?
  430.          self.ox = @picture.effect_ex[2] ? n_ox : (bitmap.width / 2) + n_ox
  431.          self.oy = (bitmap.height / 2) + n_oy
  432.          if @picture.position[0] > 0 or @picture.position[0] == -1
  433.             execute_move(0,@picture.position[2],[email protected][1].screen_x) rescue nil
  434.             execute_move(1,@picture.position[3],[email protected][1].screen_y) rescue nil
  435.          end  
  436.          return
  437.       end
  438.       if @picture.effect_ex[2] ; self.oy = (bitmap.height + n_oy) ; return ; end
  439.       if @picture.origin == 0
  440.          self.ox = n_ox ; self.oy = n_oy
  441.       else
  442.          self.ox = (bitmap.width / 2) + n_ox
  443.          self.oy = (bitmap.height / 2) + n_oy
  444.       end      
  445.   end

  446.   #--------------------------------------------------------------------------
  447.   # ● Force Center Oxy
  448.   #--------------------------------------------------------------------------
  449.   def force_center_oxy?
  450.       return false if @picture.position.empty?
  451.       return true if @picture.position[0] == -1
  452.       return true if @picture.position[0] > 0
  453.       return true if @picture.effect_ex[3]
  454.       return true if @picture.effect_ex[5]
  455.       return false
  456.   end
  457.   
  458.   #--------------------------------------------------------------------------
  459.   # ● N Ox
  460.   #--------------------------------------------------------------------------
  461.   def n_ox
  462.       return @picture.position[2] if @picture.position[0] > 0 and @picture.position[2]
  463.       return @picture.position[2] if @picture.position[0] == -1 and @picture.position[2]
  464.       return $game_map.display_x * 32 if @picture.position[0] == -2
  465.       return 1000 if @picture.position[0] == -1000
  466.       return 0
  467.   end
  468.   
  469.   #--------------------------------------------------------------------------
  470.   # ● N Oy
  471.   #--------------------------------------------------------------------------
  472.   def n_oy
  473.       return @picture.position[3] if @picture.position[0] > 0 and @picture.position[3]
  474.       return @picture.position[3] if @picture.position[0] == -1 and @picture.position[3]
  475.       return $game_map.display_y * 32 if @picture.position[0] == -2
  476.       return 1000 if @picture.position[0] == -1000
  477.       return 0
  478.   end
  479.   
  480.   #--------------------------------------------------------------------------
  481.   # ● Execute Move
  482.   #--------------------------------------------------------------------------      
  483.   def execute_move(type,cp,np)
  484.       sp = 5 + ((cp - np).abs / 5)
  485.       if cp > np ;    cp -= sp ; cp = np if cp < np
  486.       elsif cp < np ; cp += sp ; cp = np if cp > np
  487.       end     
  488.       @picture.position[2] = cp if type == 0
  489.       @picture.position[3] = cp if type == 1
  490.   end   
  491.   
  492.   #--------------------------------------------------------------------------
  493.   # ● Update Zoom
  494.   #--------------------------------------------------------------------------
  495.   alias mog_picture_ex_update_zoom update_zoom
  496.   def update_zoom
  497.       if @picture.effect_ex[2] ;  update_breath_effect ; return ; end
  498.       if @picture.effect_ex[3] ;  update_auto_zoom_effect ; return ; end
  499.       mog_picture_ex_update_zoom
  500.   end   
  501.      
  502.   #--------------------------------------------------------------------------
  503.   # ● Update Breath Effect
  504.   #--------------------------------------------------------------------------
  505.   def update_breath_effect
  506.       self.zoom_x = @picture.zoom_x / 100.0
  507.       self.zoom_y = @picture.zoom_y / 101.0 + auto_zoom(2)
  508.   end  

  509.   #--------------------------------------------------------------------------
  510.   # ● Update Auto Zoom Effect
  511.   #--------------------------------------------------------------------------
  512.   def update_auto_zoom_effect
  513.       self.zoom_x = @picture.zoom_x / 100.0 + auto_zoom(3)
  514.       self.zoom_y = @picture.zoom_y / 100.0 + auto_zoom(3)
  515.   end
  516.   
  517.   #--------------------------------------------------------------------------
  518.   # ● Auto Zoom
  519.   #--------------------------------------------------------------------------
  520.   def auto_zoom(type)
  521.       if @picture.effect_ex[type][6] == 0
  522.          @picture.effect_ex[type][6] = 1
  523.          @picture.effect_ex[type][0] = rand(50)
  524.       end
  525.       if @picture.effect_ex[type][5] < @picture.effect_ex[type][4]
  526.          @picture.effect_ex[type][5] += 1
  527.          return @picture.effect_ex[type][1]
  528.       end   
  529.       @picture.effect_ex[type][5] = 0
  530.       @picture.effect_ex[type][2] -= 1
  531.       return @picture.effect_ex[type][1] if @picture.effect_ex[type][2] > 0
  532.       @picture.effect_ex[type][2] = 2 ; @picture.effect_ex[type][0] += 1
  533.       case @picture.effect_ex[type][0]
  534.          when 0..25 ; @picture.effect_ex[type][1] += @picture.effect_ex[type][3]         
  535.          when 26..60 ; @picture.effect_ex[type][1] -= @picture.effect_ex[type][3]
  536.          else ; @picture.effect_ex[type][0] = 0 ; @picture.effect_ex[type][1] = 0
  537.       end
  538.       @picture.effect_ex[type][1] = 0 if @picture.effect_ex[type][1] < 0
  539.       @picture.effect_ex[type][1] = 0.25 if @picture.effect_ex[type][1] > 0.25 if type == 2
  540.       return @picture.effect_ex[type][1]
  541.   end

  542.   #--------------------------------------------------------------------------
  543.   # ● Can Set Wave Effect?
  544.   #--------------------------------------------------------------------------
  545.   def can_set_wave_effect?
  546.       return false if [email protected]_ex[6]
  547.       return false if [email protected]_ex[6][0]
  548.       return false if !self.bitmap
  549.       return true
  550.   end

  551.   #--------------------------------------------------------------------------
  552.   # ● Set Wave Effect
  553.   #--------------------------------------------------------------------------
  554.   def set_wave_effect
  555.       @picture.effect_ex[6][0] = false
  556.       self.wave_amp = @picture.effect_ex[6][1]
  557.       self.wave_length = self.bitmap.width
  558.       self.wave_speed = @picture.effect_ex[6][2]
  559.   end  
  560.    
  561. end
复制代码



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

本版积分规则

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

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

GMT+8, 2024-4-27 12:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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