rts-sim-module/init.go

22 lines
413 B
Go
Raw Normal View History

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