moving to a simpler (hopefully?) ecs system

main
Nick Dumas 2 weeks ago
parent f47273c2ed
commit 5430213699

@ -1,11 +1,10 @@
package main package main
import ( import (
"fmt" // "fmt"
"github.com/EngoEngine/ecs" "github.com/EngoEngine/ecs"
// "code.ndumas.com/ndumas/muddy"
"code.ndumas.com/ndumas/muddy"
) )
func main() { func main() {

@ -1,16 +1,18 @@
package muddy package systems
import ( import (
"fmt" // "fmt"
"github.com/EngoEngine/ecs" "github.com/EngoEngine/ecs"
"code.ndumas.com/ndumas/muddy/components"
) )
type Room struct { type Room struct {
ID components.ID
Location components.Location
Observable components.Observable
Inventory components.Inventory
} }
type RoomRepository interface { type RoomRepository interface {
@ -23,12 +25,5 @@ type RoomSystem struct {
repository RoomRepository repository RoomRepository
} }
func (s *RoomSystem) Initialize(w *ecs.World) { func (rs *RoomSystem) Update(dt float32) {}
fmt.Println("initializing room system") func (rs *RoomSystem) Remove(e ecs.BasicEntity) {}
// locationMapper := ecs.NewMap4[ID, Location, Observable, Inventory](w)
}
func (s *RoomSystem) Update(w *ecs.World) {}
// Finalize the system.
func (s *RoomSystem) Finalize(w *ecs.World) {}

@ -0,0 +1,30 @@
package muddy
import (
"fmt"
"github.com/EngoEngine/ecs"
"code.ndumas.com/ndumas/muddy/components"
)
type Room struct {
components.ID
components.Location
components.Observable
components.Inventory
}
type RoomSystem struct {
repository RoomRepository
}
func (s *RoomSystem) Initialize(w *ecs.World) {
fmt.Println("initializing room system")
// locationMapper := ecs.NewMap4[ID, Location, Observable, Inventory](w)
}
func (s *RoomSystem) Update(w *ecs.World) {}
// Finalize the system.
func (s *RoomSystem) Finalize(w *ecs.World) {}
Loading…
Cancel
Save