Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.92 KB | None | 0 0
  1. class TrainerFadeAnimation < PokeBattle_Animation
  2.   def createProcesses
  3.     # NOTE: The movement speeds of trainers/bar/balls are all different.
  4.     # Move trainer sprite(s) off-screen
  5.     trainer1 = addSprite(@sprites["trainer"],PictureOrigin::Bottom)
  6.     trainer1.moveDelta(0,16,Graphics.width/2,0)
  7.     if @sprites["trainer2"]
  8.       trainer2 = addSprite(@sprites["trainer2"],PictureOrigin::Bottom)
  9.       trainer2.moveDelta(0,16,Graphics.width/2,0)
  10.     end
  11.     # Move and fade party bar/balls
  12.     delay = 3
  13.     partyBar = addSprite(@sprites["partybar1"])
  14.     partyBar.moveDelta(delay,16,Graphics.width/4,0)
  15.     partyBar.moveOpacity(delay,12,0)
  16.     for i in 0...6
  17.       next if !@sprites["partyball1_#{i}"]
  18.       partyBall = addSprite(@sprites["partyball1_#{i}"])
  19.       partyBall.moveDelta(delay+2*i,16,Graphics.width,0)
  20.       partyBall.moveOpacity(delay,12,0)
  21.       # TODO: Add ball rotation...?
  22.     end
  23.   end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement