Advertisement
marlosgama

Untitled

Jul 23rd, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.80 KB | None | 0 0
  1. class Sprite_Character
  2.   #--------------------------------------------------------------------------
  3.   # ● 位置の更新
  4.   #--------------------------------------------------------------------------
  5.   alias vxace_sp1_update_position update_position
  6.   def update_position
  7.     move_animation(@character.screen_x - x, @character.screen_y - y)
  8.     vxace_sp1_update_position
  9.   end
  10.   #--------------------------------------------------------------------------
  11.   # ● アニメーションの移動
  12.   #--------------------------------------------------------------------------
  13.   def move_animation(dx, dy)
  14.     if @animation && @animation.position != 3
  15.       @ani_ox += dx
  16.       @ani_oy += dy
  17.       @ani_sprites.each do |sprite|
  18.         sprite.x += dx
  19.         sprite.y += dy
  20.       end
  21.     end
  22.   end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement