diff --git a/docs/classes.html b/docs/classes.html new file mode 100644 index 00000000..39c29ea0 --- /dev/null +++ b/docs/classes.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + classes | Documentation + + + +
+
+ +

classes

+ + + v0.0.3 +
+ + +
class(name);

Create a metatable

Arguments

nameThe class name +

 local Player = class('Player');
+
+ function Player:init(x, y)
+   self.x = x;
+   self.y = y;
+   return self;
+ end
+
+ function Player:draw()
+   circle(self.x, self.y, 16);
+ end
+
+
+ -- Create 2 players and draw them
+ local p1 = Player:new(100, 200);
+ local p2 = Player:new(300, 200);
+
+ function setup()
+   createWindow(400, 400);
+ end
+ 
+ function draw()
+   background(51);
+
+   p1:draw();
+   p2:draw();
+ end

+
+ + diff --git a/docs/events.html b/docs/events.html index 8e1f1a83..5631af7c 100644 --- a/docs/events.html +++ b/docs/events.html @@ -18,7 +18,7 @@
diff --git a/docs/index.html b/docs/index.html index 9c57ae7f..a8437f6f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -18,7 +18,7 @@
@@ -31,7 +31,7 @@

Reference

v0.0.3
- +
diff --git a/docs/io.html b/docs/io.html index e191d4f4..2649a376 100644 --- a/docs/io.html +++ b/docs/io.html @@ -18,7 +18,7 @@
diff --git a/docs/loaders.html b/docs/loaders.html index 9c2c360d..bd95360e 100644 --- a/docs/loaders.html +++ b/docs/loaders.html @@ -18,7 +18,7 @@
diff --git a/docs/math.html b/docs/math.html index 1a82d65a..1be79f38 100644 --- a/docs/math.html +++ b/docs/math.html @@ -18,7 +18,7 @@
diff --git a/docs/setting.html b/docs/setting.html index 72ee104b..f49ea24e 100644 --- a/docs/setting.html +++ b/docs/setting.html @@ -18,7 +18,7 @@
diff --git a/docs/shapes.html b/docs/shapes.html index d8c6f350..2e02b9ec 100644 --- a/docs/shapes.html +++ b/docs/shapes.html @@ -18,7 +18,7 @@
diff --git a/docs/window.html b/docs/window.html index 102e7bd8..836f4790 100644 --- a/docs/window.html +++ b/docs/window.html @@ -18,7 +18,7 @@