package entities import ( "time" "joylink.club/ecs" "joylink.club/rtsssimulation/system" "joylink.club/rtsssimulation/umi" ) // CreateModelStorageEntity 创建模型仓库实体 func CreateModelStorageEntity(w ecs.World, modelManager umi.IModelManager) *ecs.Entry { e := w.Create(system.ModelStorageComponent) system.ModelStorageComponent.Set(e, &system.ModelStorageRef{ModelManager: modelManager}) return e } // CreateSystemTimerEntity 创建系统时钟实体 func CreateSystemTimerEntity(w ecs.World, systemTime time.Time) *ecs.Entry { e := w.Create(system.SystemTimerComponent) system.SystemTimerComponent.Set(e, system.NewSystemTimer(&systemTime)) return e }