rts-sim-module/init.go
walker 5c41a01e69 调整仿真创建接口返回error
调整一些接口返回添加error
2023-10-20 15:05:56 +08:00

22 lines
434 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"
"joylink.club/rtsssimulation/sys"
)
const (
// 仿真循环间隔单位ms
RtssSimulationTick = 20
)
// 初始化仿真
func NewSimulation(repo *repository.Repository) (ecs.World, error) {
w := ecs.NewWorld(RtssSimulationTick)
sys.BindSystem(w)
err := entity.Load(w, repo)
return w, err
}