Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. powerup = {}
  2. powerup.sprite = 1
  3. powerup.x = 0
  4. powerup.y = 0
  5. powerup.active = false
  6.  
  7. function show-power-up()
  8.     if powerup.active = false then
  9.         powerup.x = rnd(120)
  10.         powerup.y = rnd(120)
  11.         powerup.active = true
  12.     end
  13.     if powerup.active = true then
  14.        
  15.         spr(powerup.sprite, powerup.x, powerup.y)
  16.     end
  17. end
  18.  
  19.  
  20. function _Draw()
  21.     cls()
  22.     spr(player.sprite, player.x, player.y)
  23.     show-power-up()
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement