daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Jan 19th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enemy_list = []
  2. enemy_laser_list = []
  3. player_laser_list = []
  4. firing = False
  5.  
  6. stage.set_background("scrollingspace")
  7. stage.disable_floor()
  8. stage.disable_ceiling()
  9. player = codesters.Sprite("rocket", 0, -220)
  10. player.set_size(0.25)
  11.  
  12. def fire_laser():
  13.     global firing
  14.     if firing is False:
  15.         firing = True
  16.         laser = codesters.Ellipse(player.get_x(), player.get_y() + 10, 3, 25, "red")
  17.         laser.set_y_speed(10)
  18.         stage.wait(1)
  19.         firing = False
  20.  
  21. def right_key():
  22.     player.move_right(20)
  23. stage.event_key("right", right_key)
  24.  
  25. def left_key():
  26.     player.move_left(20)
  27. stage.event_key("left", left_key)
  28.  
  29. def up_key():
  30.     fire_laser()
  31. stage.event_key("up", up_key)
  32.  
  33. def main():
  34.     pass
  35.  
  36. main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top