fixed bug with woka picture snapshot taking current frame and not front
This commit is contained in:
parent
ecb334cbd2
commit
ed8d6855b1
@ -120,6 +120,7 @@ export abstract class Character extends Container {
|
|||||||
public async getSnapshot(): Promise<HTMLImageElement> {
|
public async getSnapshot(): Promise<HTMLImageElement> {
|
||||||
const rt = this.scene.make.renderTexture({}, false);
|
const rt = this.scene.make.renderTexture({}, false);
|
||||||
for (const sprite of this.sprites.values()) {
|
for (const sprite of this.sprites.values()) {
|
||||||
|
sprite.setFrame(1);
|
||||||
rt.draw(sprite, sprite.displayWidth * 0.5, sprite.displayHeight * 0.5);
|
rt.draw(sprite, sprite.displayWidth * 0.5, sprite.displayHeight * 0.5);
|
||||||
}
|
}
|
||||||
return new Promise<HTMLImageElement>((resolve, reject) => {
|
return new Promise<HTMLImageElement>((resolve, reject) => {
|
||||||
|
@ -201,7 +201,7 @@ export class GameScene extends DirtyScene {
|
|||||||
private objectsByType = new Map<string, ITiledMapObject[]>();
|
private objectsByType = new Map<string, ITiledMapObject[]>();
|
||||||
private embeddedWebsiteManager!: EmbeddedWebsiteManager;
|
private embeddedWebsiteManager!: EmbeddedWebsiteManager;
|
||||||
private loader: Loader;
|
private loader: Loader;
|
||||||
private userWokaPictureStores: Map<number, UserWokaPictureStore> = new Map<number, any>();
|
private userWokaPictureStores: Map<number, UserWokaPictureStore> = new Map<number, UserWokaPictureStore>();
|
||||||
|
|
||||||
constructor(private room: Room, MapUrlFile: string, customKey?: string | undefined) {
|
constructor(private room: Room, MapUrlFile: string, customKey?: string | undefined) {
|
||||||
super({
|
super({
|
||||||
|
Loading…
Reference in New Issue
Block a user