From 8a028e6405150dada3caa4c90f34ebf93aef6163 Mon Sep 17 00:00:00 2001 From: walker Date: Tue, 23 Jan 2024 09:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E4=B8=96?= =?UTF-8?q?=E7=95=8C=E7=8A=B6=E6=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- world.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/world.go b/world.go index 73d6716..959b0bf 100644 --- a/world.go +++ b/world.go @@ -30,6 +30,8 @@ type ( // 世界运行间隔时间 Tick() int + // 获取世界状态 + State() WorldState // 启动世界 StartUp() // 暂停世界 @@ -120,6 +122,10 @@ func (w *world) Tick() int { return w.tick } +func (w *world) State() WorldState { + return w.state +} + // 添加系统 func (w *world) AddSystem(sys ...ISystem) { w.systems = append(w.systems, sys...)