From 4c95908c99e49353c22395ccc2a72b28a04d6d19 Mon Sep 17 00:00:00 2001 From: King Wang Date: Mon, 6 Dec 2021 23:56:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=20=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/shared/game/GameSystem.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/cocos-creator-multiplayer/backend/src/shared/game/GameSystem.ts b/examples/cocos-creator-multiplayer/backend/src/shared/game/GameSystem.ts index d12e9c0..9930fc4 100644 --- a/examples/cocos-creator-multiplayer/backend/src/shared/game/GameSystem.ts +++ b/examples/cocos-creator-multiplayer/backend/src/shared/game/GameSystem.ts @@ -95,7 +95,13 @@ export class GameSystem { } } - // Events (Game Push) + /* + * 事件 + * 某些转瞬即逝的事件,可能不会直观的体现在前后两帧状态的变化中,但表面层又需要知晓。 + * 例如一颗狙击枪的子弹,在少于一帧的时间内创建和销毁,前后两帧的状态中都不包含这颗子弹;但表现层却需要绘制出子弹的弹道。 + * 此时,可以通过事件的方式通知表现层。 + */ + // 发射箭矢 onNewArrow: ((arrow: ArrowState) => void)[] = []; }