Advertisement
LiTTleDRAgo

[RGSS2/3] Flip Animation

Feb 9th, 2012
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.94 KB | None | 0 0
  1. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
  2. # [Vx/Vx-A] DRG - Flip Animation
  3. # Version: 1.10
  4. # Author : LiTTleDRAgo
  5. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  6. #
  7. # How to use
  8. #
  9. # Type in the script call
  10. #
  11. #     $game_temp.animation_flip = true/false
  12. #
  13. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  14. VXA = defined?(Window_KeyItem)
  15. class Sprite_Base < Sprite
  16.   alias drg_anim3_23 animation_set_sprites if !method_defined?(:drg_anim3_23)
  17.   def animation_set_sprites(s)
  18.     drg_anim3_23(s)
  19.     e = VXA ? [@ani_mirror,@ani_sprites] : [@animation_mirror,@animation_sprites]
  20.     a, b, c = $game_temp.animation_flip, (e[0] ? 0 : 1), s.cell_data
  21.     e[1].each_with_index {|s,i| s.mirror = a ? (c[i,5] != b) : (c[i,5] == b)
  22.       s.x += -(c[i,1] * 2) if a && c[i,1] != nil }
  23.   end
  24. end
  25.  
  26. class Game_Temp; attr_accessor :animation_flip end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement