SpaceComponent keeps track of the position, size, and rotation of entities.
| 95 | |
| 96 | // SpaceComponent keeps track of the position, size, and rotation of entities. |
| 97 | type SpaceComponent struct { |
| 98 | Position engo.Point |
| 99 | Width float32 |
| 100 | Height float32 |
| 101 | Rotation float32 // angle in degrees for the rotation to apply clockwise. |
| 102 | |
| 103 | hitboxes []Shape |
| 104 | } |
| 105 | |
| 106 | // AddShape adds a shape to the SpaceComponent for use as a hitbox. A SpaceComponent |
| 107 | // can have any number of shapes attached to it. The shapes are made up of a |
nothing calls this directly
no outgoing calls
no test coverage detected