From 102081251ceef5cc6e74d6b0a73da8ec0275ace6 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Tue, 15 Aug 2023 09:17:22 +0800 Subject: [PATCH] =?UTF-8?q?world=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96tick?= =?UTF-8?q?=E5=80=BC=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- world.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/world.go b/world.go index 5af135a..4b64b50 100644 --- a/world.go +++ b/world.go @@ -45,6 +45,7 @@ type World interface { SetSpeed(speed float64) error AddSystem(sys ...ISystem) Close() + Tick() int } type world struct { @@ -73,6 +74,9 @@ func NewWorld(tick int) World { } } +func (w *world) Tick() int { + return w.tick +} func (w *world) Id() WorldId { return WorldId(w.world.Id()) }