Advertisement
Juaxix

Asteroides - Codea game - 1/10

Nov 7th, 2011
1,171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. Alien = class()
  2.  
  3. function Alien:init(avoidy)
  4.     self.position = vec2(0,math.max(math.abs(math.random(HEIGHT)-avoidy)),66)
  5.     self.angle = math.pi
  6.     self.points= 500
  7.     
  8. end
  9.  
  10. function Alien:draw()
  11.     self.position.x = self.position.x + 1.66
  12.     sprite("Small World:Base Large",self.position.x,self.position.y)
  13. end
  14.  
  15. function Alien:touched(touch)
  16.     -- Codify does not automatically call this method
  17. end
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement