diff --git a/component/component_data/ci.pb.go b/component/component_data/ci.pb.go index d4141d6..29804be 100644 --- a/component/component_data/ci.pb.go +++ b/component/component_data/ci.pb.go @@ -1156,7 +1156,7 @@ var file_component_ci_proto_depIdxs = []int32{ 0, // [0:16] is the sub-list for field type_name } -func init() { file_component_ci_proto_init() } +//func init() { file_component_ci_proto_init() } func file_component_ci_proto_init() { if File_component_ci_proto != nil { return diff --git a/component/component_data/common.pb.go b/component/component_data/common.pb.go index d077134..d1dc220 100644 --- a/component/component_data/common.pb.go +++ b/component/component_data/common.pb.go @@ -348,7 +348,7 @@ var file_component_common_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_component_common_proto_init() } +//func init() { file_component_common_proto_init() } func file_component_common_proto_init() { if File_component_common_proto != nil { return diff --git a/component/singleton/load.go b/component/singleton/load.go index 8f79bbe..fc3353c 100644 --- a/component/singleton/load.go +++ b/component/singleton/load.go @@ -9,7 +9,7 @@ import ( // 加载并初始化单例组件 func LoadSingletons(w ecs.World, r modelrepo.Repo) { loadWorldRepo(w, r) - loadWorldTime(w) + LoadWorldTime(w) loadUidEntityIndex(w) } diff --git a/component/singleton/world_time.go b/component/singleton/world_time.go index b16f6ee..f2b46cf 100644 --- a/component/singleton/world_time.go +++ b/component/singleton/world_time.go @@ -31,7 +31,7 @@ func (w *WorldTime) GetMilli() int64 { return w.time } -func loadWorldTime(w ecs.World) { +func LoadWorldTime(w ecs.World) { entry := w.Entry(w.Create(WorldTimeType)) WorldTimeType.Set(entry, &WorldTime{time: time.Now().UnixMilli()}) } diff --git a/entity/init.go b/entity/init.go index a6fba5c..e311c75 100644 --- a/entity/init.go +++ b/entity/init.go @@ -2,12 +2,14 @@ package entity import ( "joylink.club/ecs" + "joylink.club/rtsssimulation/component/singleton" "joylink.club/rtsssimulation/repository" ) // 仿真实体加载 func Load(w ecs.World, repo *repository.Repository) error { // 初始化世界数据单例组件 + singleton.LoadWorldTime(w) LoadWorldData(w, repo) // 加载联锁驱采卡相关实体 err := LoadCiQC(w) diff --git a/jl-ecs-go b/jl-ecs-go index bd947ba..f25027e 160000 --- a/jl-ecs-go +++ b/jl-ecs-go @@ -1 +1 @@ -Subproject commit bd947baa4edadb6b7bd059f6e324fb20f8171f8f +Subproject commit f25027e20535e0ae4940a34b80276c56597517fb