Guest User

Untitled

a guest
May 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.25 KB | None | 0 0
  1. A = class()
  2.  
  3. function A:init()
  4.     self.x = nil
  5. end
  6.  
  7. function A:draw()
  8.     gc:drawString(self.x, 0, 0, "top")
  9. end
  10.  
  11. B = class()
  12.  
  13. function B:init(a, x)
  14.     a.x = x
  15. end
  16.  
  17. a = A()
  18. b = B(a, 42)
  19. a:draw() -- this would print 42 on the screen
Add Comment
Please, Sign In to add comment