Pop.Box/tmp.class.usage.lua
Paul Liverman III 559fa50459 wip class system
2017-08-14 05:48:36 -07:00

13 lines
225 B
Lua

local class = require "Class"
local Car = class("Car")
function Car:__init(x, y)
self.x = x or 0
self.y = y or 0
end
function Car:print() -- this will be broken
print("I'm a car, at ("..self.x..","..self.y..")")
end