Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class redDot
- new: =>
- @x=-1
- @y=-1
- @speed=20
- update: =>
- if @x==-1
- @x=math.random 0, _A!.win.w
- @y=math.random 0, _A!.win.h
- @x=math.max(100,math.min(_A!.win.w-100,@x+math.random(-@speed,@speed)))
- @y=math.max(100,math.min(_A!.win.h-100,@y+math.random(-@speed,@speed)))
- render: =>
- font\thin 0.5
- font\color 1,0,0,0.8
- font\smooth 1.5
- font\renderGlyph @x,@y,2,"."
- font\thin 0.7
- font\color 1,0,0,1
- font\smooth 0.1
- font\renderGlyph @x,@y,2,"."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement