Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Example 5
- ImagePrototype = {data="Original"}
- function ImagePrototype.__init__ (baseClass, data)
- self = {data=data}
- setmetatable (self, {__index=ImagePrototype})
- return self
- end
- setmetatable (ImagePrototype, {__call=ImagePrototype.__init__}) --Makes ImagePrototype(...) act like ImagePrototype.__init__ (ImagePrototype, ...)
- function ImagePrototype:printData ()
- print (self.data)
- end
- local image1 = ImagePrototype ("1,1,Black;")
- image1:printData()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement