diff options
Diffstat (limited to 'build/Debug/Pico-Lua-Test.app/Contents/Resources/shot.lua')
| -rw-r--r-- | build/Debug/Pico-Lua-Test.app/Contents/Resources/shot.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/build/Debug/Pico-Lua-Test.app/Contents/Resources/shot.lua b/build/Debug/Pico-Lua-Test.app/Contents/Resources/shot.lua new file mode 100644 index 0000000..7a63b9f --- /dev/null +++ b/build/Debug/Pico-Lua-Test.app/Contents/Resources/shot.lua @@ -0,0 +1,35 @@ +--the directions +up=0 +right=1 +down=2 +left = 3 + +--parameters +this.actorname = "Bullet: Normal" +this.enemy = 0 +this.speed = 6 +this.controllable = 0 + +print(">>> Entity Created - "..this.actorname); + +function this.move(this) + + if(this:get_currentdirection() == right) then + this:set_ownspeed(this.speed) + end + + if (this:get_currentdirection() == left) then + this:set_ownspeed(-this.speed) + end + + if ( not this:can_move(left, this:get_x(), this:get_y()) or + not this:can_move(right, this:get_x(), this:get_y())) then + this:set_dying(true) + end +end + +function this.act(this) + this:move() +end + +--END
\ No newline at end of file |