rts-sim-module/init.go
walker d3a187e00f 添加创建仿真
完善仿真实体加载
2023-09-28 14:34:00 +08:00

20 lines
359 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package rtss_simulation
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/entity"
"joylink.club/rtsssimulation/repository"
)
const (
// 仿真循环间隔单位ms
RtssSimulationTick = 20
)
// 初始化仿真
func NewSimulation(repo *repository.Repository) ecs.World {
w := ecs.NewWorld(RtssSimulationTick)
entity.Load(w, repo)
return w
}