reflection goes out of the window
This commit is contained in:
@ -2,8 +2,8 @@ package types
|
||||
|
||||
import (
|
||||
"github.com/gammazero/deque"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
"lab.zaar.be/thefish/alchemyst-go/util"
|
||||
"reflect"
|
||||
)
|
||||
import blt "lab.zaar.be/thefish/bearlibterminal"
|
||||
|
||||
@ -106,6 +106,6 @@ func FillColorRing(colorValue uint8, minGlow, maxGlow, step int) *cdeque {
|
||||
return c
|
||||
}
|
||||
|
||||
func (app Appearance) TypeOf() reflect.Type {
|
||||
return reflect.TypeOf(app)
|
||||
func (app Appearance) Type() string {
|
||||
return ecs.AppearanceComponent
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
"math"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
type Coords struct {
|
||||
X, Y int
|
||||
}
|
||||
|
||||
func (сс Coords) TypeOf() reflect.Type {
|
||||
return reflect.TypeOf(сс)
|
||||
func (сс Coords) Type() string {
|
||||
return ecs.CoordsComponent
|
||||
}
|
||||
|
||||
func (c *Coords) Get() (int, int) {
|
||||
|
Reference in New Issue
Block a user