comments and more tidy
This commit is contained in:
parent
3a9109ae20
commit
7d45922c04
4 changed files with 6 additions and 16 deletions
|
@ -29,9 +29,6 @@ type DebugToast struct {
|
|||
}
|
||||
|
||||
func (d *DebugToast) Draw(screen *ebiten.Image, _ ebiten.DrawImageOptions) {
|
||||
if d.Hidden {
|
||||
return
|
||||
}
|
||||
ebitenutil.DebugPrintAt(screen, d.Text, d.Pos.X, d.Pos.Y)
|
||||
}
|
||||
|
||||
|
@ -58,9 +55,6 @@ type PerfDisplay struct {
|
|||
}
|
||||
|
||||
func (p PerfDisplay) Draw(screen *ebiten.Image, _ ebiten.DrawImageOptions) {
|
||||
if p.Hidden {
|
||||
return
|
||||
}
|
||||
ebitenutil.DebugPrint(screen, fmt.Sprintf("TPS: %0.2f FPS: %0.2f", ebiten.CurrentTPS(), ebiten.CurrentFPS()))
|
||||
}
|
||||
|
||||
|
|
|
@ -75,9 +75,9 @@ type Disabler interface {
|
|||
Enable()
|
||||
}
|
||||
|
||||
// Drawer components can draw themselves. Draw is called often.
|
||||
// Each component is responsible for calling Draw on its child components
|
||||
// (so that hiding the parent can hide the children, etc).
|
||||
// Drawer components can draw themselves. Draw is called often. Each component
|
||||
// must call Draw on any internal components not known to the engine (i.e. not
|
||||
// passed to Game.Register or returned from Scan).
|
||||
type Drawer interface {
|
||||
Draw(screen *ebiten.Image, opts ebiten.DrawImageOptions)
|
||||
DrawOrder() float64
|
||||
|
@ -167,9 +167,9 @@ type Transformer interface {
|
|||
Transform() ebiten.DrawImageOptions
|
||||
}
|
||||
|
||||
// Updater components can update themselves. Update is called repeatedly.
|
||||
// Each component is responsible for calling Update on its child components
|
||||
// (so that disabling the parent prevents updates to the children, etc).
|
||||
// Updater components can update themselves. Update is called repeatedly. Each
|
||||
// component must call Update on any internal components not known to the engine
|
||||
// (i.e. not passed to Game.Register or returned from Scan).
|
||||
type Updater interface {
|
||||
Update() error
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ type Scene struct {
|
|||
Components []interface{}
|
||||
Disabled
|
||||
Hidden
|
||||
ZOrder
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -62,9 +62,6 @@ func (r SceneRef) Disable() { r.scene.Disable() }
|
|||
// Enable calls Enable on the scene.
|
||||
func (r SceneRef) Enable() { r.scene.Enable() }
|
||||
|
||||
// DrawOrder returns the value of DrawOrder from the scene.
|
||||
func (r SceneRef) DrawOrder() float64 { return r.scene.DrawOrder() }
|
||||
|
||||
// IsHidden returns the value of IsHidden from the scene.
|
||||
func (r SceneRef) IsHidden() bool { return r.scene.IsHidden() }
|
||||
|
||||
|
|
Loading…
Reference in a new issue