This commit is contained in:
Josh Deprez 2021-09-27 11:13:45 +10:00
parent 86e435e5f8
commit e5632912de

View file

@ -68,8 +68,8 @@ func (g *Game) Update() error {
return g.updateRecursive(g)
}
// updateRecursive updates everything in a post-order traversal. It terminates recursion
// early if the component reports it is Disabled.
// updateRecursive updates everything in a post-order traversal. It terminates
// the recursion early if the component reports it is Disabled.
func (g *Game) updateRecursive(c interface{}) error {
if d, ok := c.(Disabler); ok && d.Disabled() {
return nil