From 72b4438d1ed7d59d31ab8020b396a15dfcd97fc9 Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 7 Feb 2022 10:39:03 +0100 Subject: [PATCH 1/7] outline color is decided from particular system level --- front/src/Phaser/Entity/Character.ts | 8 +++---- front/src/Phaser/Game/ActivatablesManager.ts | 8 ++++--- front/src/Phaser/Game/GameScene.ts | 6 +++++ front/src/Phaser/Game/OutlineableInterface.ts | 4 ++-- front/src/Stores/OutlineColorStore.ts | 24 +++++++++---------- 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index 5ec031bd..c26b87ba 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -455,16 +455,16 @@ export abstract class Character extends Container implements OutlineableInterfac this.outlineColorStore.removeApiColor(); } - public pointerOverOutline(): void { - this.outlineColorStore.pointerOver(); + public pointerOverOutline(color: number): void { + this.outlineColorStore.pointerOver(color); } public pointerOutOutline(): void { this.outlineColorStore.pointerOut(); } - public characterCloseByOutline(): void { - this.outlineColorStore.characterCloseBy(); + public characterCloseByOutline(color: number): void { + this.outlineColorStore.characterCloseBy(color); } public characterFarAwayOutline(): void { diff --git a/front/src/Phaser/Game/ActivatablesManager.ts b/front/src/Phaser/Game/ActivatablesManager.ts index 60e967d9..90f1c8d3 100644 --- a/front/src/Phaser/Game/ActivatablesManager.ts +++ b/front/src/Phaser/Game/ActivatablesManager.ts @@ -11,6 +11,8 @@ export class ActivatablesManager { private currentPlayer: Player; + private readonly outlineColor = 0xffff00; + constructor(currentPlayer: Player) { this.currentPlayer = currentPlayer; } @@ -27,7 +29,7 @@ export class ActivatablesManager { } this.selectedActivatableObjectByPointer = object; if (isOutlineable(this.selectedActivatableObjectByPointer)) { - this.selectedActivatableObjectByPointer?.pointerOverOutline(); + this.selectedActivatableObjectByPointer?.pointerOverOutline(this.outlineColor); } } @@ -37,7 +39,7 @@ export class ActivatablesManager { } this.selectedActivatableObjectByPointer = undefined; if (isOutlineable(this.selectedActivatableObjectByDistance)) { - this.selectedActivatableObjectByDistance?.characterCloseByOutline(); + this.selectedActivatableObjectByDistance?.characterCloseByOutline(this.outlineColor); } } @@ -60,7 +62,7 @@ export class ActivatablesManager { } this.selectedActivatableObjectByDistance = newNearestObject; if (isOutlineable(this.selectedActivatableObjectByDistance)) { - this.selectedActivatableObjectByDistance?.characterCloseByOutline(); + this.selectedActivatableObjectByDistance?.characterCloseByOutline(this.outlineColor); } } diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 242d97c8..e7242f90 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -1737,6 +1737,12 @@ ${escapedMessage} emoteMenuStore.openEmoteMenu(); } }); + this.CurrentPlayer.on(Phaser.Input.Events.POINTER_OVER, (pointer: Phaser.Input.Pointer) => { + this.CurrentPlayer.pointerOverOutline(0x00ffff); + }); + this.CurrentPlayer.on(Phaser.Input.Events.POINTER_OUT, (pointer: Phaser.Input.Pointer) => { + this.CurrentPlayer.pointerOutOutline(); + }); this.CurrentPlayer.on(requestEmoteEventName, (emoteKey: string) => { this.connection?.emitEmoteEvent(emoteKey); analyticsClient.launchEmote(emoteKey); diff --git a/front/src/Phaser/Game/OutlineableInterface.ts b/front/src/Phaser/Game/OutlineableInterface.ts index bee560cc..7112fe84 100644 --- a/front/src/Phaser/Game/OutlineableInterface.ts +++ b/front/src/Phaser/Game/OutlineableInterface.ts @@ -3,8 +3,8 @@ export interface OutlineableInterface { removeFollowOutlineColor(): void; setApiOutlineColor(color: number): void; removeApiOutlineColor(): void; - pointerOverOutline(): void; + pointerOverOutline(color: number): void; pointerOutOutline(): void; - characterCloseByOutline(): void; + characterCloseByOutline(color: number): void; characterFarAwayOutline(): void; } diff --git a/front/src/Stores/OutlineColorStore.ts b/front/src/Stores/OutlineColorStore.ts index a35cc9c9..a444037d 100644 --- a/front/src/Stores/OutlineColorStore.ts +++ b/front/src/Stores/OutlineColorStore.ts @@ -5,38 +5,36 @@ export function createColorStore() { let followColor: number | undefined = undefined; let apiColor: number | undefined = undefined; + let pointedByPointer: number | undefined = undefined; + let pointedByCharacter: number | undefined = undefined; - let pointedByPointer: boolean = false; - let pointedByCharacter: boolean = false; const updateColor = () => { - if (pointedByPointer || pointedByCharacter) { - set(0xffff00); - } else { - set(followColor ?? apiColor); - } + console.log('update color'); + console.log(pointedByPointer, pointedByCharacter, followColor, apiColor); + set(pointedByPointer ?? pointedByCharacter ?? followColor ?? apiColor); }; return { subscribe, - pointerOver() { - pointedByPointer = true; + pointerOver(color: number) { + pointedByPointer = color; updateColor(); }, pointerOut() { - pointedByPointer = false; + pointedByPointer = undefined; updateColor(); }, - characterCloseBy() { - pointedByCharacter = true; + characterCloseBy(color: number) { + pointedByCharacter = color; updateColor(); }, characterFarAway() { - pointedByCharacter = false; + pointedByCharacter = undefined; updateColor(); }, From bf0d2eb4124a16895363e0a600411a47f088517a Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 7 Feb 2022 11:08:52 +0100 Subject: [PATCH 2/7] directional shift for current player when trying to activate entities --- front/src/Phaser/Entity/Character.ts | 13 +++++++++++++ front/src/Phaser/Game/ActivatablesManager.ts | 8 ++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index c26b87ba..061bc2e5 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -159,6 +159,19 @@ export abstract class Character extends Container implements OutlineableInterfac return { x: this.x, y: this.y }; } + /** + * Returns position based on where player is currently facing + * @param shift How far from player should the point of interest be. + */ + public getDirectionalActivationPosition(shift: number): { x: number, y: number } { + switch (this.lastDirection) { + case PlayerAnimationDirections.Down: { return { x: this.x, y: this.y + shift }; } + case PlayerAnimationDirections.Left: { return { x: this.x - shift, y: this.y }; } + case PlayerAnimationDirections.Right: { return { x: this.x + shift, y: this.y }; } + case PlayerAnimationDirections.Up: { return { x: this.x, y: this.y - shift }; } + } + } + public getObjectToOutline(): Phaser.GameObjects.GameObject { return this.playerNameText; } diff --git a/front/src/Phaser/Game/ActivatablesManager.ts b/front/src/Phaser/Game/ActivatablesManager.ts index 90f1c8d3..f5f893db 100644 --- a/front/src/Phaser/Game/ActivatablesManager.ts +++ b/front/src/Phaser/Game/ActivatablesManager.ts @@ -12,6 +12,7 @@ export class ActivatablesManager { private currentPlayer: Player; private readonly outlineColor = 0xffff00; + private readonly directionalActivationPositionShift = 50; constructor(currentPlayer: Player) { this.currentPlayer = currentPlayer; @@ -79,7 +80,7 @@ export class ActivatablesManager { return closestObject; } public updateActivatableObjectsDistances(objects: ActivatableInterface[]): void { - const currentPlayerPos = this.currentPlayer.getPosition(); + const currentPlayerPos = this.currentPlayer.getDirectionalActivationPosition(this.directionalActivationPositionShift); for (const object of objects) { const distance = MathUtils.distanceBetween(currentPlayerPos, object.getPosition()); this.activatableObjectsDistances.set(object, distance); @@ -89,7 +90,10 @@ export class ActivatablesManager { public updateDistanceForSingleActivatableObject(object: ActivatableInterface): void { this.activatableObjectsDistances.set( object, - MathUtils.distanceBetween(this.currentPlayer.getPosition(), object.getPosition()) + MathUtils.distanceBetween( + this.currentPlayer.getDirectionalActivationPosition(this.directionalActivationPositionShift), + object.getPosition(), + ) ); } } From aec7790875e9802e494c88168c32d198d06a8d8b Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 7 Feb 2022 12:36:33 +0100 Subject: [PATCH 3/7] disable activation by distance if in JITSI --- front/src/Phaser/Game/ActivatablesManager.ts | 46 ++++++++++++++----- front/src/Phaser/Game/GameScene.ts | 2 + .../UserInput/GameSceneUserInputHandler.ts | 5 +- front/src/Stores/OutlineColorStore.ts | 2 - 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/front/src/Phaser/Game/ActivatablesManager.ts b/front/src/Phaser/Game/ActivatablesManager.ts index f5f893db..f136de7c 100644 --- a/front/src/Phaser/Game/ActivatablesManager.ts +++ b/front/src/Phaser/Game/ActivatablesManager.ts @@ -11,6 +11,8 @@ export class ActivatablesManager { private currentPlayer: Player; + private canSelectByDistance: boolean = true; + private readonly outlineColor = 0xffff00; private readonly directionalActivationPositionShift = 50; @@ -49,6 +51,9 @@ export class ActivatablesManager { } public deduceSelectedActivatableObjectByDistance(): void { + if (!this.canSelectByDistance) { + return; + } const newNearestObject = this.findNearestActivatableObject(); if (this.selectedActivatableObjectByDistance === newNearestObject) { return; @@ -67,18 +72,6 @@ export class ActivatablesManager { } } - private findNearestActivatableObject(): ActivatableInterface | undefined { - let shortestDistance: number = Infinity; - let closestObject: ActivatableInterface | undefined = undefined; - - for (const [object, distance] of this.activatableObjectsDistances.entries()) { - if (object.isActivatable() && object.activationRadius > distance && shortestDistance > distance) { - shortestDistance = distance; - closestObject = object; - } - } - return closestObject; - } public updateActivatableObjectsDistances(objects: ActivatableInterface[]): void { const currentPlayerPos = this.currentPlayer.getDirectionalActivationPosition(this.directionalActivationPositionShift); for (const object of objects) { @@ -96,4 +89,33 @@ export class ActivatablesManager { ) ); } + + public disableSelectingByDistance(): void { + this.canSelectByDistance = false; + if (isOutlineable(this.selectedActivatableObjectByDistance)) { + this.selectedActivatableObjectByDistance?.characterFarAwayOutline(); + } + this.selectedActivatableObjectByDistance = undefined; + } + + public enableSelectingByDistance(): void { + this.canSelectByDistance = true; + } + + private findNearestActivatableObject(): ActivatableInterface | undefined { + let shortestDistance: number = Infinity; + let closestObject: ActivatableInterface | undefined = undefined; + + for (const [object, distance] of this.activatableObjectsDistances.entries()) { + if (object.isActivatable() && object.activationRadius > distance && shortestDistance > distance) { + shortestDistance = distance; + closestObject = object; + } + } + return closestObject; + } + + public isSelectingByDistanceEnabled(): boolean { + return this.canSelectByDistance; + } } diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index e7242f90..0f081c14 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -957,9 +957,11 @@ export class GameScene extends DirtyScene { this.gameMap.onPropertyChange(GameMapProperties.JITSI_ROOM, (newValue, oldValue, allProps) => { if (newValue === undefined) { + this.activatablesManager.enableSelectingByDistance(); layoutManagerActionStore.removeAction("jitsi"); this.stopJitsi(); } else { + this.activatablesManager.disableSelectingByDistance(); const openJitsiRoomFunction = () => { const roomName = jitsiFactory.getRoomName(newValue.toString(), this.instance); const jitsiUrl = allProps.get(GameMapProperties.JITSI_URL) as string | undefined; diff --git a/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts b/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts index 4d9ac8a9..566e8882 100644 --- a/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts +++ b/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts @@ -53,8 +53,9 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface { public handlePointerDownEvent(pointer: Phaser.Input.Pointer, gameObjects: Phaser.GameObjects.GameObject[]): void {} public handleSpaceKeyUpEvent(event: Event): Event { - const activatable = this.gameScene.getActivatablesManager().getSelectedActivatableObject(); - if (activatable && activatable.isActivatable()) { + const activatableManager = this.gameScene.getActivatablesManager(); + const activatable = activatableManager.getSelectedActivatableObject(); + if (activatable && activatable.isActivatable() && activatableManager.isSelectingByDistanceEnabled()) { activatable.activate(); } return event; diff --git a/front/src/Stores/OutlineColorStore.ts b/front/src/Stores/OutlineColorStore.ts index a444037d..97a443e1 100644 --- a/front/src/Stores/OutlineColorStore.ts +++ b/front/src/Stores/OutlineColorStore.ts @@ -10,8 +10,6 @@ export function createColorStore() { const updateColor = () => { - console.log('update color'); - console.log(pointedByPointer, pointedByCharacter, followColor, apiColor); set(pointedByPointer ?? pointedByCharacter ?? followColor ?? apiColor); }; From 4bae6e75b1c37913361b5b5f15abfb5f4344b792 Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 7 Feb 2022 12:37:59 +0100 Subject: [PATCH 4/7] enable activating by distance if in JITSI and JITSI was already opened --- front/src/Phaser/Game/GameScene.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 0f081c14..37b9a066 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -972,6 +972,7 @@ export class GameScene extends DirtyScene { } else { this.startJitsi(roomName, undefined); } + this.activatablesManager.enableSelectingByDistance(); layoutManagerActionStore.removeAction("jitsi"); }; From 81272fbb3cc09736b0577b070020c516d7395fff Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 7 Feb 2022 13:47:33 +0100 Subject: [PATCH 5/7] yarn.lock update --- yarn.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b9698f61..adbed748 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,7 @@ # yarn lockfile v1 -"husky@^6.0.0": - "resolved" "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz" - "version" "6.0.0" +husky@^7.0.1: + version "7.0.4" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535" + integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== From d4801507289464a2a649a24400df4d3ff80be1fe Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 7 Feb 2022 14:22:43 +0100 Subject: [PATCH 6/7] cleaner approach to disable activatablesManager distance check if space-event --- front/src/Interfaces/UserInputHandlerInterface.ts | 3 +++ front/src/Phaser/Game/GameScene.ts | 3 --- front/src/Phaser/UserInput/GameSceneUserInputHandler.ts | 9 +++++++++ front/src/Phaser/UserInput/UserInputManager.ts | 4 ++-- front/src/Stores/LayoutManagerStore.ts | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/front/src/Interfaces/UserInputHandlerInterface.ts b/front/src/Interfaces/UserInputHandlerInterface.ts index cf7b2f1c..2a8c6b3e 100644 --- a/front/src/Interfaces/UserInputHandlerInterface.ts +++ b/front/src/Interfaces/UserInputHandlerInterface.ts @@ -9,4 +9,7 @@ export interface UserInputHandlerInterface { handlePointerUpEvent: (pointer: Phaser.Input.Pointer, gameObjects: Phaser.GameObjects.GameObject[]) => void; handlePointerDownEvent: (pointer: Phaser.Input.Pointer, gameObjects: Phaser.GameObjects.GameObject[]) => void; handleSpaceKeyUpEvent: (event: Event) => Event; + + addSpaceEventListener: (callback: Function) => void; + removeSpaceEventListner: (callback: Function) => void; } diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 37b9a066..e7242f90 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -957,11 +957,9 @@ export class GameScene extends DirtyScene { this.gameMap.onPropertyChange(GameMapProperties.JITSI_ROOM, (newValue, oldValue, allProps) => { if (newValue === undefined) { - this.activatablesManager.enableSelectingByDistance(); layoutManagerActionStore.removeAction("jitsi"); this.stopJitsi(); } else { - this.activatablesManager.disableSelectingByDistance(); const openJitsiRoomFunction = () => { const roomName = jitsiFactory.getRoomName(newValue.toString(), this.instance); const jitsiUrl = allProps.get(GameMapProperties.JITSI_URL) as string | undefined; @@ -972,7 +970,6 @@ export class GameScene extends DirtyScene { } else { this.startJitsi(roomName, undefined); } - this.activatablesManager.enableSelectingByDistance(); layoutManagerActionStore.removeAction("jitsi"); }; diff --git a/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts b/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts index 566e8882..fc9e83cf 100644 --- a/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts +++ b/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts @@ -60,4 +60,13 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface { } return event; } + + public addSpaceEventListener(callback: Function): void { + this.gameScene.input.keyboard.addListener("keyup-SPACE", callback); + this.gameScene.getActivatablesManager().disableSelectingByDistance(); + } + public removeSpaceEventListner(callback: Function): void { + this.gameScene.input.keyboard.removeListener("keyup-SPACE", callback); + this.gameScene.getActivatablesManager().enableSelectingByDistance(); + } } diff --git a/front/src/Phaser/UserInput/UserInputManager.ts b/front/src/Phaser/UserInput/UserInputManager.ts index 112ab0e5..e7f814b9 100644 --- a/front/src/Phaser/UserInput/UserInputManager.ts +++ b/front/src/Phaser/UserInput/UserInputManager.ts @@ -223,10 +223,10 @@ export class UserInputManager { } addSpaceEventListner(callback: Function) { - this.scene.input.keyboard.addListener("keyup-SPACE", callback); + this.userInputHandler.addSpaceEventListener(callback); } removeSpaceEventListner(callback: Function) { - this.scene.input.keyboard.removeListener("keyup-SPACE", callback); + this.userInputHandler.removeSpaceEventListner(callback); } destroy(): void { diff --git a/front/src/Stores/LayoutManagerStore.ts b/front/src/Stores/LayoutManagerStore.ts index b6f428aa..e0f8d955 100644 --- a/front/src/Stores/LayoutManagerStore.ts +++ b/front/src/Stores/LayoutManagerStore.ts @@ -1,4 +1,5 @@ import { derived, writable } from "svelte/store"; +import type { ActivatablesManager } from "../Phaser/Game/ActivatablesManager"; import type { UserInputManager } from "../Phaser/UserInput/UserInputManager"; export interface LayoutManagerAction { From c29ce6e9a932de9cdef37406eab0d8278ea1ff69 Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 7 Feb 2022 14:23:34 +0100 Subject: [PATCH 7/7] prettier --- front/src/Phaser/Entity/Character.ts | 18 +++++++++++++----- front/src/Phaser/Game/ActivatablesManager.ts | 6 ++++-- front/src/Stores/OutlineColorStore.ts | 1 - 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index 061bc2e5..b411eee7 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -163,12 +163,20 @@ export abstract class Character extends Container implements OutlineableInterfac * Returns position based on where player is currently facing * @param shift How far from player should the point of interest be. */ - public getDirectionalActivationPosition(shift: number): { x: number, y: number } { + public getDirectionalActivationPosition(shift: number): { x: number; y: number } { switch (this.lastDirection) { - case PlayerAnimationDirections.Down: { return { x: this.x, y: this.y + shift }; } - case PlayerAnimationDirections.Left: { return { x: this.x - shift, y: this.y }; } - case PlayerAnimationDirections.Right: { return { x: this.x + shift, y: this.y }; } - case PlayerAnimationDirections.Up: { return { x: this.x, y: this.y - shift }; } + case PlayerAnimationDirections.Down: { + return { x: this.x, y: this.y + shift }; + } + case PlayerAnimationDirections.Left: { + return { x: this.x - shift, y: this.y }; + } + case PlayerAnimationDirections.Right: { + return { x: this.x + shift, y: this.y }; + } + case PlayerAnimationDirections.Up: { + return { x: this.x, y: this.y - shift }; + } } } diff --git a/front/src/Phaser/Game/ActivatablesManager.ts b/front/src/Phaser/Game/ActivatablesManager.ts index f136de7c..74c637d7 100644 --- a/front/src/Phaser/Game/ActivatablesManager.ts +++ b/front/src/Phaser/Game/ActivatablesManager.ts @@ -73,7 +73,9 @@ export class ActivatablesManager { } public updateActivatableObjectsDistances(objects: ActivatableInterface[]): void { - const currentPlayerPos = this.currentPlayer.getDirectionalActivationPosition(this.directionalActivationPositionShift); + const currentPlayerPos = this.currentPlayer.getDirectionalActivationPosition( + this.directionalActivationPositionShift + ); for (const object of objects) { const distance = MathUtils.distanceBetween(currentPlayerPos, object.getPosition()); this.activatableObjectsDistances.set(object, distance); @@ -85,7 +87,7 @@ export class ActivatablesManager { object, MathUtils.distanceBetween( this.currentPlayer.getDirectionalActivationPosition(this.directionalActivationPositionShift), - object.getPosition(), + object.getPosition() ) ); } diff --git a/front/src/Stores/OutlineColorStore.ts b/front/src/Stores/OutlineColorStore.ts index 97a443e1..8ecd7293 100644 --- a/front/src/Stores/OutlineColorStore.ts +++ b/front/src/Stores/OutlineColorStore.ts @@ -8,7 +8,6 @@ export function createColorStore() { let pointedByPointer: number | undefined = undefined; let pointedByCharacter: number | undefined = undefined; - const updateColor = () => { set(pointedByPointer ?? pointedByCharacter ?? followColor ?? apiColor); };