func NewInput(queue input.InputQueue, entityDB *core.EntityDB) *Input { input := new(Input) input.inputQueue = queue input.entitySet = entityDB.RegisterListener(input, components.INPUT) return input }
func NewGraphical(renderer render.Renderer, entityDB *core.EntityDB) *Graphical { obj := Graphical{} obj.renderer = renderer obj.entitySet = entityDB.RegisterListener(&obj, components.TRANSFORM, components.VISUAL) obj.materialLoader = render.NewMaterialLoader() obj.meshes = make(MeshMap) obj.LoadMesh(render.DefaultMesh) obj.LoadMaterial(render.DefaultMaterial) return &obj }
func NewAnimation(entityDB *core.EntityDB) *Animation { animation := new(Animation) animation.entitySet = entityDB.RegisterListener(animation, components.ANIMATION) return animation }
func NewTransform(entityDB *core.EntityDB) *Transform { transform := new(Transform) transform.entitySet = entityDB.RegisterListener(transform, components.TRANSFORM) return transform }