fix: deleted animatedsprites in story
not finish loading function yet
This commit is contained in:
		
							parent
							
								
									edcc5eaffc
								
							
						
					
					
						commit
						21068c799a
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user