This commit is contained in:
Josh Deprez 2021-09-22 17:07:13 +10:00
parent 5650efb17b
commit 4ce9a5b673
3 changed files with 0 additions and 27 deletions

View file

@ -163,11 +163,6 @@ func (d *DrawDAG) Register(component, _ interface{}) error {
return nil return nil
} }
if sc, ok := component.(Scanner); ok { if sc, ok := component.(Scanner); ok {
/*for _, x := range sc.Scan() {
if err := d.Register(x, nil); err != nil {
return err
}
}*/
scv := func(x interface{}) error { scv := func(x interface{}) error {
return d.Register(x, nil) return d.Register(x, nil)
} }
@ -239,9 +234,6 @@ func (d *DrawDAG) Unregister(component interface{}) {
return return
} }
if sc, ok := component.(Scanner); ok { if sc, ok := component.(Scanner); ok {
/*for _, x := range sc.Scan() {
d.Unregister(x)
}*/
scv := func(x interface{}) error { scv := func(x interface{}) error {
d.Unregister(x) d.Unregister(x)
return nil return nil

View file

@ -46,9 +46,6 @@ func (d *DrawDFS) draw(component interface{}, screen *ebiten.Image, opts ebiten.
} }
// Has subcomponents? recurse // Has subcomponents? recurse
if sc, ok := component.(Scanner); ok { if sc, ok := component.(Scanner); ok {
/*for _, ch := range sc.Scan() {
d.draw(ch, screen, opts)
}*/
scv := func(x interface{}) error { scv := func(x interface{}) error {
d.draw(x, screen, opts) d.draw(x, screen, opts)
return nil return nil

View file

@ -75,12 +75,6 @@ func (g *Game) updateRecursive(c interface{}) error {
return nil return nil
} }
if sc, ok := c.(Scanner); ok { if sc, ok := c.(Scanner); ok {
/*for _, x := range sc.Scan() {
if err := g.updateRecursive(x); err != nil {
return err
}
}
*/
if err := sc.Scan(g.updateRecursive); err != nil { if err := sc.Scan(g.updateRecursive); err != nil {
return err return err
} }
@ -191,11 +185,6 @@ func preorderWalk(component, parent interface{}, visit func(component, parent in
if !ok { if !ok {
return nil return nil
} }
/*for _, c := range sc.Scan() {
if err := preorderWalk(c, component, visit); err != nil {
return err
}
}*/
scv := func(c interface{}) error { scv := func(c interface{}) error {
return preorderWalk(c, component, visit) return preorderWalk(c, component, visit)
} }
@ -215,11 +204,6 @@ func postorderWalk(component, parent interface{}, visit func(component, parent i
scv := func(c interface{}) error { scv := func(c interface{}) error {
return postorderWalk(c, component, visit) return postorderWalk(c, component, visit)
} }
/*for _, c := range sc.Scan() {
if err := postorderWalk(c, component, visit); err != nil {
return err
}
}*/
if err := sc.Scan(scv); err != nil { if err := sc.Scan(scv); err != nil {
return err return err
} }