2023-09-27 18:39:18 +08:00
|
|
|
package sys
|
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/ecs"
|
2023-12-28 16:49:28 +08:00
|
|
|
"joylink.club/rtsssimulation/component/singleton"
|
2023-09-27 18:39:18 +08:00
|
|
|
)
|
|
|
|
|
2023-12-28 16:49:28 +08:00
|
|
|
// 世界时间更新系统
|
2023-09-27 18:39:18 +08:00
|
|
|
type WorldTimeSys struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewWorldTimeSys() *WorldTimeSys {
|
2023-12-28 16:49:28 +08:00
|
|
|
return &WorldTimeSys{}
|
2023-09-27 18:39:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *WorldTimeSys) Update(w ecs.World) {
|
2023-12-28 16:49:28 +08:00
|
|
|
singleton.GetWorldTime(w).Run(w.Tick())
|
2023-10-09 18:07:39 +08:00
|
|
|
// t := time.UnixMilli(data.Time)
|
|
|
|
// fmt.Println(t)
|
2023-09-27 18:39:18 +08:00
|
|
|
}
|