Starting entities, components, and levels

This commit is contained in:
bloeys
2022-08-14 22:00:04 +04:00
parent 52b77e017e
commit 35ff496a9a
6 changed files with 145 additions and 6 deletions

20
level/level.go Executable file
View File

@ -0,0 +1,20 @@
package level
import (
"github.com/bloeys/nmage/assert"
"github.com/bloeys/nmage/entity"
)
type Level struct {
*entity.Registry
Name string
}
func NewLevel(name string, maxEntities uint32) *Level {
assert.T(name != "", "Level name can not be empty")
return &Level{
Name: name,
Registry: entity.NewRegistry(maxEntities),
}
}