From 10a0e290ac07524dc129cc2b227b0f9e95df0f8e Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 16 Apr 2012 09:39:52 -0500 Subject: first commit --- .../Contents/Resources/npc_jumper.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua (limited to 'build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua') diff --git a/build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua b/build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua new file mode 100644 index 0000000..91409c4 --- /dev/null +++ b/build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua @@ -0,0 +1,19 @@ +--Configuration for the Jumper +this.actorname = "Enemy: Jumper" +this.enemy = 1 +this.controllable = 0 +this.jumpstrength = 6 + +print(">>> Entity Created - "..this.actorname); + +function this.jump(this) + if (this:get_vertical_speed() == 0 and math.random(150) == 50) then + this:set_vertical_speed(this:get_vertical_speed()-this.jumpstrength) + end +end + +function this.act(this) + this:jump() +end + +--END \ No newline at end of file -- cgit