]> git.r.bdr.sh - rbdr/pico-engine/blame_incremental - build/Debug/Pico-Lua-Test.app/Contents/Resources/shot.lua
first commit
[rbdr/pico-engine] / build / Debug / Pico-Lua-Test.app / Contents / Resources / shot.lua
... / ...
CommitLineData
1--the directions
2up=0
3right=1
4down=2
5left = 3
6
7--parameters
8this.actorname = "Bullet: Normal"
9this.enemy = 0
10this.speed = 6
11this.controllable = 0
12
13print(">>> Entity Created - "..this.actorname);
14
15function this.move(this)
16
17 if(this:get_currentdirection() == right) then
18 this:set_ownspeed(this.speed)
19 end
20
21 if (this:get_currentdirection() == left) then
22 this:set_ownspeed(-this.speed)
23 end
24
25 if ( not this:can_move(left, this:get_x(), this:get_y()) or
26 not this:can_move(right, this:get_x(), this:get_y())) then
27 this:set_dying(true)
28 end
29end
30
31function this.act(this)
32 this:move()
33end
34
35--END