blob: 758085b8ee161ebdba11c49cbfd52121e44d16b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|