2 this.actorname = "Bullet: Crawlshot"
3 this.enemy = enemy_weapon
5 this.controllable = false
10 print(">>> Entity Created - "..this.actorname);
12 function this.move(this)
14 if(this:get_currentdirection() == right) then
15 this:set_ownspeed(this.speed)
18 if (this:get_currentdirection() == left) then
19 this:set_ownspeed(-this.speed)
22 if ( ( not this:can_move(left, this:get_x(), this:get_y()) and this:get_currentdirection() == left ) or
23 ( not this:can_move(right, this:get_x(), this:get_y()) and this:get_currentdirection() == right ) ) then
24 this.bumpcount = this.bumpcount + 1
26 this:switchdirection()
27 if this.bumpcount >= this.bumplimit then
33 function this.switchdirection(this)
35 if(this:get_currentdirection() == right) then
36 this:set_currentdirection(left)
37 this:set_ownspeed(-this.speed)
38 elseif (this:get_currentdirection() == left) then
39 this:set_currentdirection(right)
40 this:set_ownspeed(this.speed)
44 function this.act(this)