summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/.gitignore1
-rw-r--r--examples/resources/images/LICENCE11
-rw-r--r--examples/resources/images/arcade_platformerV2.pngbin0 -> 37323 bytes
-rw-r--r--examples/resources/lib/vector2.lua2
-rw-r--r--examples/resources/lib/vector3.lua2
5 files changed, 11 insertions, 5 deletions
diff --git a/examples/.gitignore b/examples/.gitignore
new file mode 100644
index 0000000..a1bb56d
--- /dev/null
+++ b/examples/.gitignore
@@ -0,0 +1 @@
+platformer \ No newline at end of file
diff --git a/examples/resources/images/LICENCE b/examples/resources/images/LICENCE
index fca0d39..ce0f32f 100644
--- a/examples/resources/images/LICENCE
+++ b/examples/resources/images/LICENCE
@@ -1,5 +1,6 @@
-Resource Author Licence Source
-tiles.png Chris Hamons (maintainer) CC0 https://opengameart.org/content/dungeon-crawl-32x32-tiles
-apple.png Jussi Viitala CC0
-grass.png Jussi Viitala CC0
-snake.png Jussi Viitala CC0 \ No newline at end of file
+Resource Author Licence Source
+tiles.png Chris Hamons (maintainer) CC0 https://opengameart.org/content/dungeon-crawl-32x32-tiles
+arcade_platformerV2.png GrafxKid CC0 https://opengameart.org/content/arcade-platformer-assets
+apple.png Jussi Viitala CC0
+grass.png Jussi Viitala CC0
+snake.png Jussi Viitala CC0
diff --git a/examples/resources/images/arcade_platformerV2.png b/examples/resources/images/arcade_platformerV2.png
new file mode 100644
index 0000000..1a529d2
--- /dev/null
+++ b/examples/resources/images/arcade_platformerV2.png
Binary files differ
diff --git a/examples/resources/lib/vector2.lua b/examples/resources/lib/vector2.lua
index 305f483..862718f 100644
--- a/examples/resources/lib/vector2.lua
+++ b/examples/resources/lib/vector2.lua
@@ -45,6 +45,8 @@ Vector2.meta = {
function Vector2:new( x, y )
if type( x ) == "table" then
x, y = table.unpack( x )
+ elseif type( x ) == "nil" then
+ x, y = 0, 0
end
local o = {
diff --git a/examples/resources/lib/vector3.lua b/examples/resources/lib/vector3.lua
index b0f1be9..bf3e4a7 100644
--- a/examples/resources/lib/vector3.lua
+++ b/examples/resources/lib/vector3.lua
@@ -59,6 +59,8 @@ end
function Vector3:set( x, y, z )
if type( x ) == "table" then
x, y, z = table.unpack( x )
+ elseif type( x ) == "nil" then
+ x, y, z = 0, 0, 0
end
self.x = x