LastMUD/internal/game/components/common.go
Miroslav Vasilev b2212a279c ECS refactor
2025-06-25 20:14:07 +03:00

29 lines
468 B
Go

package components
import "code.haedhutner.dev/mvv/LastMUD/internal/game/ecs"
const (
TypeName ecs.ComponentType = iota
TypeDescription
TypePlayerState
TypeInRoom
TypeNeighbors
TypeIsRoom
TypeIsPlayer
)
type NameComponent struct {
Name string
}
func (c NameComponent) Type() ecs.ComponentType {
return TypeName
}
type DescriptionComponent struct {
Description string
}
func (c DescriptionComponent) Type() ecs.ComponentType {
return TypeDescription
}