grid shadow and animations

This commit is contained in:
Piotr 'pwh' Hanusiak
2022-03-28 12:29:31 +02:00
parent f656702bb9
commit 81c5876a66
4 changed files with 66 additions and 22 deletions
@@ -31,4 +31,16 @@ export class TexturesHelper {
throw new Error("Could not get the snapshot");
}
}
public static createRectangleTexture(
scene: Phaser.Scene,
textureKey: string,
width: number,
height: number,
color: number
): void {
const rectangleTexture = scene.add.graphics().fillStyle(color, 1).fillRect(0, 0, width, height);
rectangleTexture.generateTexture(textureKey, width, height);
rectangleTexture.destroy();
}
}