MCPcopy
hub / github.com/EngoEngine/engo / SpaceComponent

Struct SpaceComponent

common/collision.go:97–104  ·  view source on GitHub ↗

SpaceComponent keeps track of the position, size, and rotation of entities.

Source from the content-addressed store, hash-verified

95
96// SpaceComponent keeps track of the position, size, and rotation of entities.
97type 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected