]> git.r.bdr.sh - rbdr/pico-engine/blob - build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/npc_jumper.lua
first commit
[rbdr/pico-engine] / build / Debug / Pico-Lua-Test.app / Contents / Resources / scripts / npc_jumper.lua
1 --Configuration for the Jumper
2 this.actorname = "Enemy: Jumper"
3 this.enemy = enemy_evil
4 this.controllable = false
5 this.jumpstrength = 6
6 this.physics = true
7
8 print(">>> Entity Created - "..this.actorname);
9
10 function this.jump(this)
11 if (this:get_vertical_speed() == 0 and math.random(150) == 50) then
12 this:set_vertical_speed(this:get_vertical_speed()-this.jumpstrength)
13 end
14 end
15
16 function this.act(this)
17 this:jump()
18 end
19
20 --END