sort interfaces

This commit is contained in:
Josh Deprez 2021-08-18 20:41:55 +10:00
parent 44b4f46ecb
commit e98b730465

View file

@ -11,12 +11,6 @@ type Collider interface {
CollidesWith(image.Rectangle) bool CollidesWith(image.Rectangle) bool
} }
// ParallaxScaler components have a scaling factor. This is used for
// parallax layers in a scene, and can be thought of as 1/distance.
type ParallaxScaler interface {
ParallaxFactor() float64
}
// Drawer components can draw themselves. Draw is called often. // Drawer components can draw themselves. Draw is called often.
// Each component is responsible for calling Draw on its child components // Each component is responsible for calling Draw on its child components
// (so that hiding the parent can hide the children, etc). // (so that hiding the parent can hide the children, etc).
@ -35,6 +29,12 @@ type Identifier interface {
Ident() string Ident() string
} }
// ParallaxScaler components have a scaling factor. This is used for
// parallax layers in a scene, and can be thought of as 1/distance.
type ParallaxScaler interface {
ParallaxFactor() float64
}
// Prepper components can be prepared. It is called after the component // Prepper components can be prepared. It is called after the component
// database has been populated but before the game is run. The component can // database has been populated but before the game is run. The component can
// store the reference to game, if needed, and also query the component database. // store the reference to game, if needed, and also query the component database.