This commit is contained in:
Josh Deprez 2021-09-21 12:50:57 +10:00
parent 045ab20cd5
commit 64e46b2b65
2 changed files with 8 additions and 6 deletions

View file

@ -139,7 +139,9 @@ func (d *DrawDAG) Update() error {
return nil
}
// Add adds a Drawer and any needed edges to the DAG and chunk map.
// Add adds a Drawer and any needed edges to the DAG and chunk map. If x is
// intended to be a direct subcomponent of d, then the caller must append to
// d.Components as well.
func (d *DrawDAG) Add(x DrawBoxer) {
// Ensure vertex is present
d.dag.addVertex(x)

View file

@ -13,20 +13,20 @@ import (
var (
// TypeOf(pointer to interface).Elem() is "idiomatic" -
// see https://pkg.go.dev/reflect#example-TypeOf
BoundingRecterType = reflect.TypeOf((*BoundingRecter)(nil)).Elem()
BoundingBoxerType = reflect.TypeOf((*BoundingBoxer)(nil)).Elem()
BoundingRecterType = reflect.TypeOf((*BoundingRecter)(nil)).Elem()
ColliderType = reflect.TypeOf((*Collider)(nil)).Elem()
DisablerType = reflect.TypeOf((*Disabler)(nil)).Elem()
DrawLayerType = reflect.TypeOf((*DrawManager)(nil)).Elem()
DrawerType = reflect.TypeOf((*Drawer)(nil)).Elem()
DrawBoxerType = reflect.TypeOf((*DrawBoxer)(nil)).Elem()
DrawerType = reflect.TypeOf((*Drawer)(nil)).Elem()
DrawManagerType = reflect.TypeOf((*DrawManager)(nil)).Elem()
DrawOrdererType = reflect.TypeOf((*DrawOrderer)(nil)).Elem()
HiderType = reflect.TypeOf((*Hider)(nil)).Elem()
IdentifierType = reflect.TypeOf((*Identifier)(nil)).Elem()
LoaderType = reflect.TypeOf((*Loader)(nil)).Elem()
PrepperType = reflect.TypeOf((*Prepper)(nil)).Elem()
ScannerType = reflect.TypeOf((*Scanner)(nil)).Elem()
SaverType = reflect.TypeOf((*Saver)(nil)).Elem()
ScannerType = reflect.TypeOf((*Scanner)(nil)).Elem()
TransformerType = reflect.TypeOf((*Transformer)(nil)).Elem()
UpdaterType = reflect.TypeOf((*Updater)(nil)).Elem()
@ -36,7 +36,7 @@ var (
BoundingBoxerType,
ColliderType,
DisablerType,
DrawLayerType,
DrawManagerType,
DrawerType,
DrawBoxerType,
DrawOrdererType,