func RunFuncCondTraverse(e Entity, f func(e Entity) bool) {
	traverseChildren := f(e)
	if traverseChildren {
		children := e.Children(false)  
		if children != nil {
			for _, child := range children {
				RunFuncCondTraverse(child, f)
			}
		}
	}
}
Same as above but instead of stopping completely, will not traverse the children of e when f returns false
package ui
import (
	"github.com/jonas747/termbox-go"
)
type Entity interface {
	Children(recursive bool) []Entity
	Destroy()
	GetTransform() *Transform
}
type BaseEntity struct {
	Transform Transform
}
func RunFunc(e Entity, f func(e Entity)) {
	f(e)
	children := e.Children(false)  
	if children != nil {
		for _, child := range children {
			RunFunc(child, f)
		}
	}
}
func RunFuncCond(e Entity, f func(e Entity) bool) bool {
	cont := f(e)
	if !cont {
		return false
	}
	for _, child := range e.Children(false) {
		cont := RunFuncCond(child, f)
		if !cont {
			return false
		}
	}
	return true
}