LastMUD/internal/game/components/common.go

30 lines
468 B
Go
Raw Normal View History

2025-06-25 20:14:07 +03:00
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
}