Documentation
¶
Overview ¶
The component package has some basic structs that are common in games (e.g. velocity)
Index ¶
- type Coordinate
- func (c Coordinate) Add(other Coordinate) Coordinate
- func (c Coordinate) GetDirection(other Coordinate) float32
- func (c Coordinate) GetDistance(other Coordinate) float32
- func (c *Coordinate) SetCoordinate(newCoord Coordinate)
- func (c Coordinate) String() string
- func (c Coordinate) Subtract(other Coordinate) Coordinate
- func (c Coordinate) TranslateXY(offset Coordinate, pixelSize float32) (float32, float32)
- type PixelSize
- type Position
- type Rotation
- type Size
- type UUID
- type Velocity
- type Width
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinate ¶
func (Coordinate) Add ¶
func (c Coordinate) Add(other Coordinate) Coordinate
func (Coordinate) GetDirection ¶
func (c Coordinate) GetDirection(other Coordinate) float32
func (Coordinate) GetDistance ¶
func (c Coordinate) GetDistance(other Coordinate) float32
func (*Coordinate) SetCoordinate ¶
func (c *Coordinate) SetCoordinate(newCoord Coordinate)
func (Coordinate) String ¶
func (c Coordinate) String() string
func (Coordinate) Subtract ¶
func (c Coordinate) Subtract(other Coordinate) Coordinate
func (Coordinate) TranslateXY ¶
func (c Coordinate) TranslateXY(offset Coordinate, pixelSize float32) (float32, float32)
Click to show internal directories.
Click to hide internal directories.