From 2f054f0132643a21de1ae7d1486a1c3db434108e Mon Sep 17 00:00:00 2001 From: walker Date: Mon, 9 Oct 2023 18:07:39 +0800 Subject: [PATCH] =?UTF-8?q?submodule=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/main.go | 7 +++++-- jl-ecs-go | 2 +- sys/world_time.go | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/main.go b/examples/main.go index 63ecc56..1971e52 100644 --- a/examples/main.go +++ b/examples/main.go @@ -1,7 +1,7 @@ package main import ( - "fmt" + "time" rtss_simulation "joylink.club/rtsssimulation" "joylink.club/rtsssimulation/repository" @@ -9,6 +9,9 @@ import ( func main() { sim := rtss_simulation.NewSimulation(&repository.Repository{}) - fmt.Println(sim.Id()) sim.StartUp() + sim.SetSpeed(2) + time.Sleep(1 * time.Second) + sim.Close() + time.Sleep(2 * time.Second) } diff --git a/jl-ecs-go b/jl-ecs-go index 3e93f02..47f78cb 160000 --- a/jl-ecs-go +++ b/jl-ecs-go @@ -1 +1 @@ -Subproject commit 3e93f029564904dcc0a2537458fd0a64e3aa4540 +Subproject commit 47f78cb54ddc2673b87d3f85eea23e3769e417ad diff --git a/sys/world_time.go b/sys/world_time.go index 42c2c09..9c55d31 100644 --- a/sys/world_time.go +++ b/sys/world_time.go @@ -21,4 +21,6 @@ func (s *WorldTimeSys) Update(w ecs.World) { entry, _ := s.query.First(w) data := component.WorldDataType.Get(entry) data.Time += int64(w.Tick()) + // t := time.UnixMilli(data.Time) + // fmt.Println(t) }