]> git.r.bdr.sh - rbdr/pico-engine/blob - build/Debug/Pico-Lua-Test.app/Contents/Resources/scripts/shot-wave.lua
first commit
[rbdr/pico-engine] / build / Debug / Pico-Lua-Test.app / Contents / Resources / scripts / shot-wave.lua
1 --parameters
2 this.actorname = "Bullet: Wave"
3 this.enemy = enemy_weapon
4 this.speed = 10
5 this.controllable = false
6 this.physics = false
7 this.angle = 0
8 this.noclip = true
9
10 print(">>> Entity Created - "..this.actorname);
11
12 function this.move(this)
13
14 if(this:get_currentdirection() == right) then
15 this:set_ownspeed(this.speed)
16 end
17
18 if (this:get_currentdirection() == left) then
19 this:set_ownspeed(-this.speed)
20 end
21
22 this:set_y(this:get_y()+ (10 * math.sin(math.rad(this.angle))) )
23 this.angle = this.angle + 45
24
25 if ( this:get_x() < this:get_map_sx() or this:get_x() > this:get_map_sx() + this:get_cfg_screen_width()) then
26 this:set_dying(true)
27 end
28 end
29
30 function this.act(this)
31 this:move()
32 end
33
34 --END