Create GameMapProperties index

This commit is contained in:
Alexis Faizeau 2021-11-02 10:51:02 +01:00
parent ec3120cf8f
commit 5a3d510f05
8 changed files with 92 additions and 65 deletions

View file

@ -1,6 +1,7 @@
import type { ITiledMapObject } from "../Map/ITiledMap";
import type { GameScene } from "../Game/GameScene";
import { type } from "os";
import { GameMapProperties } from "../Game/GameMapProperties";
export class TextUtils {
public static createTextFromITiledMapObject(scene: GameScene, object: ITiledMapObject): void {
@ -32,7 +33,7 @@ export class TextUtils {
}
if (object.properties !== undefined) {
for (const property of object.properties) {
if (property.name === "font-family" && typeof property.value === "string") {
if (property.name === GameMapProperties.FONT_FAMILY && typeof property.value === "string") {
options.fontFamily = property.value;
}
}