fix: deleted animatedsprites in story

not finish loading function yet
This commit is contained in:
Renge 2022-04-06 14:37:02 -04:00
parent edcc5eaffc
commit 21068c799a
2 changed files with 10 additions and 10 deletions

View File

@ -136,15 +136,15 @@ export default class SceneWithStory extends Scene {
})
}
break;
case "loadAnimatedSprite":
this.load.spritesheet(action.key, action.path);
this.load.loadResourcesFromQueue(() => {
tmp = this.add.animatedSprite(action.key, "story");
tmp.position.set(action.positon[0], action.positon[1]);
tmp.scale.set(action.scale[0], action.scale[1]);
this.storySprites.push(tmp);
});
break;
// case "loadAnimatedSprite":
// this.load.spritesheet(action.key, action.path);
// this.load.loadResourcesFromQueue(() => {
// tmp = this.add.animatedSprite(action.key, "story");
// tmp.position.set(action.positon[0], action.positon[1]);
// tmp.scale.set(action.scale[0], action.scale[1]);
// this.storySprites.push(tmp);
// });
// break;
case "moveSprite":
tmp = this.storySprites.find(function (sprite) {
return sprite.imageId === action.key;

View File

@ -10,7 +10,7 @@ export class Text {
}
export class Action {
type: "loadSprite" | "loadAnimatedSprite" | "moveSprite" | "showSprite" | "hideSprite";
type: "loadSprite" /*| "loadAnimatedSprite"*/ | "moveSprite" | "showSprite" | "hideSprite";
key: string;
path?: string;
positon?: [number, number];