rts-sim-module/component/singleton.go

19 lines
335 B
Go
Raw Normal View History

package component
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/repository"
)
// 世界数据单例组件
type WorldData struct {
Repo *repository.Repository
// 世界时间,时间戳,单位ms
Time int64
EntityMap map[string]*ecs.Entry
}
// 世界公共数据
var WorldDataType = ecs.NewComponentType[WorldData]()