Debian Codegraph @

scripts/collision.lua

raw symbols SCIP
1 assert(poly, 'missing poly argument')
2 assert(collision_type, 'missing collision_type argument')
3
4 local body
5
6 function collision_registry()
7 body = body or {
8 poly = poly,
9 type = collision_type,
10 actor = self,
11 player = self.ship and self.ship.player or self.bullet.player
12 }
13
14 body.pos = self.transform.pos
15 body.facing = self.transform.facing
16 game.collision.add_body(body)
17 end