Guest User

Untitled

a guest
May 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     import net.flashpunk.World;
  4.    
  5.     public class MyWorld extends World
  6.     {
  7.         private var BulletCreator:Number = 0;
  8.        
  9.         public function MyWorld()
  10.         {
  11.             add(new Player);
  12.         }
  13.        
  14.         override public function update():void
  15.         {
  16.             BulletCreator += 1;
  17.             if (BulletCreator > 29)
  18.             {
  19.                 BulletCreator = 0;
  20.                 add(new Bullet);
  21.             }
  22.         }
  23.    
  24.     }
  25.  
  26. }
Add Comment
Please, Sign In to add comment