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