Advertisement
LiTTleDRAgo

[RGSS] Flip Animation

Feb 9th, 2012
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.80 KB | None | 0 0
  1. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
  2. # [Xp] 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. class RPG::Sprite < ::Sprite
  15.   alias drg_anim3_23 animation_set_sprites if !method_defined?(:drg_anim3_23)
  16.   def animation_set_sprites(s, c, p)
  17.     drg_anim3_23(s, c, p)
  18.     a = $game_temp.animation_flip
  19.     (0..15).each {|i| s[i].mirror = (a ? (c[i,5] != 1) : (c[i,5] == 1))
  20.       s[i].x += -(c[i,1] * 2) if a && c[i,1] != nil }
  21.   end
  22. end
  23.  
  24. class Game_Temp; attr_accessor :animation_flip end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement