use gogues ecs, not working, needs rethinking

This commit is contained in:
2019-11-04 19:07:16 +03:00
parent fd27dfd636
commit f9ebcefc86
13 changed files with 490 additions and 33 deletions

View File

@ -3,6 +3,7 @@ package types
import (
"github.com/gammazero/deque"
"lab.zaar.be/thefish/alchemyst-go/util"
"reflect"
)
import blt "lab.zaar.be/thefish/bearlibterminal"
@ -78,7 +79,6 @@ type Appearance struct {
ColorSet *TileColorSet `json:"colorSet"`
}
func SingleColorRing(colorValue uint8) *cdeque {
c := &cdeque{}
c.PushBack(colorValue)
@ -104,4 +104,8 @@ func FillColorRing(colorValue uint8, minGlow, maxGlow, step int) *cdeque {
c.PushBack(uint8(v))
}
return c
}
func (app Appearance) TypeOf() reflect.Type {
return reflect.TypeOf(app)
}

View File

@ -1,11 +1,18 @@
package types
import "math"
import (
"math"
"reflect"
)
type Coords struct {
X, Y int
}
func (сс Coords) TypeOf() reflect.Type {
return reflect.TypeOf(сс)
}
func (c *Coords) Get() (int, int) {
return c.X, c.Y
}