| 1 | local v2 = require 'dokidoki.v2' |
| 2 | local blueprints = require 'blueprints' |
| 3 | |
| 4 | local speed = 3.5 |
| 5 | |
| 6 | function shoot(approach_sign) |
| 7 | local facing = approach_sign * v2.rotate90(self.transform.facing) |
| 8 | local start_vel = speed * facing -- + self.ship.velocity |
| 9 | game.actors.new(blueprints.bomb, |
| 10 | {'transform', pos=self.transform.pos, facing=facing}, |
| 11 | {'bullet', player=self.ship.player, velocity=start_vel}) |
| 12 | end |