CollisionComponent keeps track of the entity's collisions. Main tells the system to check all collisions against this entity. Group tells which collision group his entity belongs to. Extra is the allowed buffer for detecting collisions. Collides is all the groups this component collides with ORe
| 490 | // |
| 491 | // Collides is all the groups this component collides with ORed together |
| 492 | type CollisionComponent struct { |
| 493 | // if a.Main & (bitwise) b.Group, items can collide |
| 494 | // if a.Main == 0, it will not loop for other items |
| 495 | Main, Group CollisionGroup |
| 496 | Extra engo.Point |
| 497 | Collides CollisionGroup |
| 498 | } |
| 499 | |
| 500 | // CollisionMessage is sent whenever a collision is detected by the CollisionSystem. |
| 501 | type CollisionMessage struct { |
nothing calls this directly
no outgoing calls
no test coverage detected