]> git.r.bdr.sh - rbdr/pico-engine/blame - 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
CommitLineData
10a0e290
BB
1--Configuration for the Jumper
2this.actorname = "Enemy: Jumper"
3this.enemy = enemy_evil
4this.controllable = false
5this.jumpstrength = 6
6this.physics = true
7
8print(">>> Entity Created - "..this.actorname);
9
10function 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
14end
15
16function this.act(this)
17 this:jump()
18end
19
20--END