aboutsummaryrefslogtreecommitdiff
path: root/build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2012-04-16 09:39:52 -0500
committerBen Beltran <ben@nsovocal.com>2012-04-16 09:39:52 -0500
commit10a0e290ac07524dc129cc2b227b0f9e95df0f8e (patch)
treeed518c45c45d96e37e28640f745496fffb8e1325 /build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua
first commit
Diffstat (limited to 'build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua')
-rw-r--r--build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua b/build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua
new file mode 100644
index 0000000..758085b
--- /dev/null
+++ b/build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua
@@ -0,0 +1,34 @@
+--parameters
+this.actorname = "Bullet: Wave"
+this.enemy = enemy_weapon
+this.speed = 10
+this.controllable = false
+this.physics = false
+this.angle = 0
+this.noclip = true
+
+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
+
+ this:set_y(this:get_y()+ (10 * math.sin(math.rad(this.angle))) )
+ this.angle = this.angle + 45
+
+ if ( this:get_x() < this:get_map_sx() or this:get_x() > this:get_map_sx() + this:get_cfg_screen_width()) then
+ this:set_dying(true)
+ end
+end
+
+function this.act(this)
+ this:move()
+end
+
+--END \ No newline at end of file