package objs import ( "github.com/Zyko0/go-sdl3/sdl" "ponger/ecs" ) type Root struct { *ecs.GameObject Height, Width int32 } func (root *Root) Render(r *sdl.Renderer) { root.Safe(r.SetDrawColor(0, 0, 0, 255)) root.Safe(r.Clear()) } func NewRoot(window *sdl.Window, children ...ecs.IsGameObject) ecs.IsGameObject { x, y, _ := window.Size() r := &Root{ GameObject: &ecs.GameObject{ Position: sdl.FPoint{}, Children: children, }, Width: x, Height: y, } return r }