Create GameMapProperties index
This commit is contained in:
parent
ec3120cf8f
commit
5a3d510f05
8 changed files with 92 additions and 65 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue