From ebeeb30fb13a26d720f84f91ac3903825a19d498 Mon Sep 17 00:00:00 2001 From: kts of kettek <kts@kettek.net> Date: Sun, 30 Jan 2022 12:27:14 -0800 Subject: [PATCH] Turn entities every night --- Engine/src/states/Game.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Engine/src/states/Game.ts b/Engine/src/states/Game.ts index 987925a..6bf76d0 100644 --- a/Engine/src/states/Game.ts +++ b/Engine/src/states/Game.ts @@ -585,16 +585,18 @@ export function GameState(ctx: ContextI, selectedAnimal: string, selectedSegment l.colorMatrix.saturate(-0.75, true) //l.colorMatrix.hue(160, true) } - for (let e of entities) { - } } else { playSong('GGJ-HappyMusic') for (let l of layers) { l.colorMatrix.reset() } - for (let e of entities) { + } + for (let e of entities) { + if (e instanceof AnimalEntity) { + e.turn() } } + isNight = b }