Search the Community
Showing results for tags 'Destroy'.
-
Hi! I'm new to this forum. I've searched a lot, but couldn't find a way to fix my issue. What I'm trying to do is to override destroy method of the Sprite class. Here's a code, that I use (TypeScript): const destroySprite = Sprite.prototype.destroy; console.log(PIXI.Sprite.prototype, PIXI.Sprite, Sprite.prototype, Sprite, PIXI); Sprite.prototype.destroy = function (options: any) { // doing some extra logic destroySprite.call(this, options); }; But when I debug the application - I see that I can only step into this overridden method from the derived objects (like Text, TilingSprite etc.). Pixi's version in the package.json is: "pixi.js": "^5.3.8", Also I use webpack 5 for modules bundling. I have some suspicion that it may be the source of problems. And there's a result console.log, that I've added to the code snippet above: I would be very thankful if someone could give me an advise on how that issue can be fixed. Thanks in advance.
-
Hey community, this is my first post here, I am sharing my scene in which I have used bounce and collision effect of phaser 3 , I have marked comments in order for understanding and reference purposes. The code I have laid down is as follows: window.onload = () => {//creating game window. class MainScene extends Phaser.Scene { preload() {// the following function preloads the image asset required in scene this.load.image("bird", "bird.png"); } create() { this.player = this.add.group();//grouping the sprite in order to load them at different positions this.time.addEvent({ delay: 1000, loop: true, callback: () => this.addBall() })//calling back addBall function after this.physics.add.collider(this.player, this.player);//setting collider object between every object } update() { if (this.player.getChildren().length > 10) {// if qty of objects/player is >10 const bird = this.player.getFirstAlive();//getting 1st instance of player this.tweens.add({targets: [bird], alpha: 0, duration: 500, onComplete: () => bird.destroy()});//deleting first instance of player } this.player.getChildren().forEach(bird => bird.setAngularVelocity(bird.body.velocity.x * 1));//to produce spiral motion } addBall() { const bird = this.physics.add.sprite(game.config.width / 3, 150, "bird");//assigning sprite to bird vairable this.player.add(bird);//assigning ball to bird.setBounce(0.7);//setting bounce value , bird.setDrag(1);//setting drag value bird.setCollideWorldBounds(true);//to enable collision setting bounds bird.setVelocity(Phaser.Math.Between(-800, 800), 0);//setting velocity bird.setScale(Math.random());//so that the objects are of random, not same size, } } const game = new Phaser.Game({ type: Phaser.AUTO, width: 600,//frame width height: 600,//frame height physics: { default: 'arcade', arcade: { gravity: {y: 1000},//setting up gravity value } }, scene: [MainScene] }); }; So thats how my scene looks and all the birds disappear after a certain time, as mentioned in the code, Feel free to suggest what more I shall improve upon in order to grow and develop, and how you feel of this scene. Thank You
-
Hi, i can't remove the video with video.destroy. It stop it but, it stay on screen. window.onload = function() { var game = new Phaser.Game(674, 520, Phaser.AUTO, '', { preload : preload }); var aide2; function preload() { game.load.onLoadComplete.add(create, this); game.load.atlasJSONArray('closeAide', 'assets/images/closeAide.png','assets/images/closeAide.json'); game.load.video('aide','assets/video/wormhole.mp4'); } function create() { aide = game.add.video('aide'); aide.play(true); aide.addToWorld(); closeAide = game.add.button(20, 20, 'closeAide',clicCloseAide); } function clicCloseAide() { aide.destroy(); closeAide.destroy(); } } the video is available here : https://phaser.io/examples/v2/video/play-video thanks for your help
-
I guess this is not a problem if you just reload a page, but my website changes routes without reload. I have a Phaser game running on a page, when I visit another page, I noticed game is still running. I never had to think about how to destroy the game properly since now. How do I destroy a Phaser game, what callbacks are fired and what else do I have to do, to properly destroy a Phaser game.
-
I'm using the animated tiles plugin from nkholski with the key 'animatedTiles' (how did I come up with that? It's genius). At a certain point I am destroying the game with `game.destroy(true)`. Unfortunately, when creating a new game I'm getting a warning "Scene Plugin key in use: animatedTiles" that then leads to an error "Uncaught TypeError: Cannot read property 'init' of undefined". I've checked the scene and sure enough, the plugin has not been added to it. I tried destroying the game cache before destroying the game, but that just gave me an error too. Josh
-
I'm trying to create platforms for my player to jump onto and also make collectible stars. I can create these sprites using functions, but I don't know how to make physics work on them so that the character can jump on the platforms and overlap with the stars. The problem is that the physics portion doesn't work when I call it in the update function. I am also not using tilesprites, so it can't work that way. create: function() { addStar(star1); }, update: function() { removeStar(star1); } addStar(name) { name = game.add.sprite(1700, 550, 'star'); name.anchor.setTo(0.5, 0.5); this.game.physics.enable(name, Phaser.Physics.ARCADE); name.body.collideWorldBounds = false; name.enableBody = true; name.body.immovable = true; } removeStar(name) { if (game.physics.arcade.overlap(character, name) == true) { name.destroy(); updateScore(); } }
-
Hi I'm new to Phaser, so please forgive that I also posted to the Google Group on this subject. I'm not yet sure where it's best to ask this kind of question. I am developing a SPA with Angular2 and so am playing with Phaser 3 as it's modularity seems to enable it to be used with Angular2. I need to be able to load a game, then close it, then load a new game in it's place. What is the proper way to "destroy" a Phaser 3 game please? I note that there is a destroy method in src/scene/System.js as per the attached image. I notice the "TO DO" so it may be that this is just not implemented yet? Any thoughts or feedback would be very welcome. Thanks so much! Dougi
-
Hi all, I'm working on my first Phaser based game, online documentaion is very useful, but I can't find informations about destroying instances. function Enemy(game, layer, x, y, enemyStyle){ var newX = 0; var newY = 0; switch(enemyStyle){ case 'big_guy': newX = x; newY = y-68; break; case 'fast_guy': newX = x; newY = y-24; break; } var mySprite = game.add.sprite(newX, newY, decoType); mySprite.anchor.setTo(0.5, 0.5); layer.add(mySprite); } Enemy.prototype.delete = function(){ mySprite.destroy(); } Here I can destroy the enemy sprite, but not the enemy instance..
-
Hello, 1. I created a group groupA in the game. 2. I created a sprite spriteA and added it to groupA. 3. After that I kill() spriteA and keep its reference in a pool array for later use. 4. I destroy() groupA. 5. I get the spriteA from the pool array to be used in another group and try to change its texture with loadTexture(), I get error: phaser2.8.8.js:46794 Uncaught TypeError: Cannot read property 'cache' of null at Phaser.Sprite.loadTexture (phaser2.8.8.js:46794) That doesn't happen if I don't destroy the group in step 4. Could anyone please explain what is going on and what is the right way to reuse Sprites even when their container parents are destroyed?
-
Hello there, I'm trying without success to find all stages and renderers that PIXI has in memory, so I can call destroy on them and their children. I'm sure there is a way to have that so I don't have to keep track on my application. It is a React website and therefore the component that had that reference is unmounted and then mounted again later on. When I instantiate a new stage and renderer, I can see them piling up and using a lot of memory as I go from one part of my website to another. How could I find all instances so I destroy them before creating new ones? I have the global PIXI object on window... Thanks a lot!
-
I'm making a simple bug-catching game where the main character catches the bugs using the kill() function when they overlap. It's working, except that he can bounce on the bugs. How can I stop him from being able to bounce on them? The update function looks like this: game.physics.arcade.overlap(this.player, this.fireflies, this.takeFirefly, null, this); and the takeFirefly function looks like this: takeFirefly: function(player, firefly) { firefly.kill(); score++; this.txtScore.setText( score.toString() ); }, main.js
-
Hi! I'm having trouble with destroying the game after use. I'm calling game.destroy(), but this does not properly shut down the core game loop, hence crashing in: c.Game.updatec.RequestAnimationFrame.updateRAFwindow.requestAnimationFrame.forceSetTimeOut._onLoopwith the error: Uncaught TypeError: Cannot read property 'slowMotion' of nullFrom the source code it looks like game.destroy() should cancel all further updates etc. Maybe I'm missing something?
-
Hi all, I'm trying to use Slick UI to dynamically create multiple choice question prompts in a new game (see image). The problem is, there doesn't seem to be a way to remove a panel, or update its child elements once they have been created. I couldn't find a way to do this directly through Phaser either. Any help greatly appreciated. Perhaps there is a Phaser method to destroy all children generated by a particular plugin? Cheers, Paul.
-
Hi all, this is my first post here. I have created a game with emitter particles that flow up from the bottom of the game canvas. My question is I want to destroy the partial (sprite) onClick which will in turn give a set value to the score. I cannot for the life of me work out how to destroy the particle on click. any help would be greatly appreciated as I cannot find any documentation specifically for this. Any advice would be greatly appreciated, as I am unsure if the emitter is the best way to achieve what I want. emitter = this.emitter = this.game.add.emitter(this.game.world.centerX, this.game.world.centerY); // This emitter will have a width of 800px, so a particle can emit from anywhere in the range emitter.x += emitter.width / 2 emitter.width = 900; emitter.height = 200; emitter.y = 1200; emitter.makeParticles('key'); emitter.minParticleSpeed.set(0, 10); emitter.maxParticleSpeed.set(0, -80); emitter.setRotation(20, -60); emitter.setAlpha(1, 1); emitter.setScale(1,1, 0.5, 0.5); emitter.gravity = 0; emitter.flow(4000, 100, 100, -1); // This will emit a quantity of 5 particles every 500ms. Each particle will live for 2000ms. // The -1 means "run forever" emitter.start(false, 4000, 500, 15, true);
-
Hey everybody, First of all big thanks to Pixi.js people for the awesome library. I have been using Pixi to develop a simple game and I stumble upon a small bug or I may be doing this wrong. So here is the problem, I got a sprite which contains child's sprites. And I want to destroy it but not the children since I was handling it manually because I need to save the state of each child sprite and then call destroy within them self. So before I calling destroy method I call a custom method on my object, deletingObject.onDestroy(); and then call deletingObject.destroy({ children: false, texture: false, baseTexture: false }); but this still destroys all the child within this object, I'm using https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.1.1/pixi.min.js as my Pixi version. and I have attached a screen shot from core developer tools. Am I doing the function call wrong or is there something missing. Thanks.
-
hello, I have an error when using destroy() on group.children[0] function create() { boomerangBullets = this.game.add.group(); boomerangBullets.enableBody = true; boomerangBullets.physicsBodyType = Phaser.Physics.ARCADE; boomerangBullets.setAll('checkWorldBounds', false); boomerangBullets.setAll('outOfBoundsKill', true); } function update() { if(game.physics.arcade.distanceBetween(player, boomerangBullets.children[0]) < 30) { boomerangBullets.children[0].destroy(); } } here is an error screenshot --> http://prntscr.com/cnea7s Please help me, the kill() method is working fine but I need to completely destroy the group children element.
-
I simply want to know the best approach for destroying a group and everything within the group. According to the documentation: destroy(destroyChildren, soft) Destroys this group. Removes all children, then removes this group from its parent and nulls references. Unfortunately, I'm still finding that my references return an object - not null or undefined For reference, here is a simplified look at the object I'm trying to destroy: class MyObject extends Phaser.Group { constructor(game) { this.game = game; // Creating Phaser sprites and adding them to group } destroyObject() { this.destroy(); } }
-
I'm having a hard time triggering onDestroy for my FreezeEffect object. I've essentially set up an object that destroys itself after a few seconds. I've tested and confirmed that "destroyObject" is being called. But sometimes the game ends, the state transitions in the middle of the FreezeEffect, and the "onDestroy" method is never called. I was under the assumption that calling state.start('newState') destroys the Phaser objects in the previous state. Is that not true? Example code: // Freeze Effect FreezeEffect = function (game) { ... constructor code ... ... create tween to fade freeze effect ... // Call function to destroy the freeze effect when the tween finishes tween.onComplete.add(this.destroyObject, this); // Slow down time game.time.slowMotion = 2.0; }; FreezeEffect.prototype = Object.create(Phaser.Group.prototype); FreezeEffect.prototype.constructor = FreezeEffect; FreezeEffect.prototype.destroyObject = function() { // Put time at normal speed this.game.time.slowMotion = 1.0; this.parentGroup.destroy(true, false); this.freezeSFX.destroy(); // Destroy the object and free memory this.destroy(true, false); }; FreezeEffect.prototype.onDestroy = function() { // Put time at normal speed this.game.time.slowMotion = 1.0; }
-
I'm trying to remove sprites from a group using destroy() whenever the sprite goes out of the world bounds, but I'm getting an unexpected error: Cannot read property 'world' of null. Any idea why this is happening? function create() { buildings = game.add.group() var building = buildings.create(0, 0, 'building') building.body.velocity.y += 90 building.events.onOutOfBounds.add(onBuildingOutOfBounds, this)}function onBuildingOutOfBounds(building) { building.destroy() console.log(buildings.length)}
-
Hi I was wondering if I should explicitly destroy all the tweens that I create? I am moving objects on screen every few seconds with one time tweens like so: this.state.add.tween(child).to({ y: prevY + this.blockHeight }, 300, Phaser.Easing.Quadratic.In, true)is it destroyed automatically after the tween is completed or should I destroy it? thanks Lior
-
When trying to clean up my stage on game over, I loop through my game object groups and destroy all children inside explicitly. Then I destroy the (now empty) groups: cleanGroup(Grp1); // Grp1 is child of Stage groupcleanGroup(Grp2); // Grp2 is child of Stage groupcleanGroup(Grp3), // Grp3 is child of Stage groupcleanGroup(Stage);var cleanGroup = function(Grp) { if (Grp.children) { while (Grp.children.length) Grp.removeChildAt(0).destroy(); } Grp.destroy(); }However, this always gives me a hole bunch of error messages like: this.children is null this.parent is null o is null The error messages are constantly repeating as if it where within a loop anywhere inside the Pixi render enginge. Why is this and how could this be solved? Do I need to destroy my created sprites and groups at all or is it enough just to remove all of my references to them and let the garbage collection do the rest? Would this be reliable?
-
Hello, I've got a strange error. I've got a quitting menu in my game which basically ask you if you want to quit or not when you click on a button (that part works fine). If ever you answer "Nope" then I will destroy without any mercy all sprites that were used to buld the quit menu (that part kinda works but wait for it...). Problem is if you can't set your mind and you click that quitting button once again, and decide to say no a second time (why would you even do that I don't know but...) and at that point no sprites are destroyed (none, not even one) but the game unpause for the rest of it and there's menu bits in the game (great T_T). Also it throws an error at the 8th element (it doesn't destroy any of the first seven ones though) which is : "Uncaught TypeError: Cannot read property 'parentNode' of null". I've tried real hard to understand this but I don't. Why the hell does it works once and not twice? Here's some code : Quit Menu code : quitButton = game.add.sprite(SIZE_X * 0.03, SIZE_Y * 0.03, 'quit'); quitButton.inputEnabled = true; quitButton.events.onInputUp.add(function () { var darkScreen; var exitButton, exitButtonText, exitButtonHitBox; var unpauseButton, unpauseButtonText, unpauseButtonHitBox; var showQuitMessage; var quitTitleSprite, quitMessageSprite; // Pause game pauseGame(game, gameBoard); miniature.inputEnabled = false; quitButton.inputEnabled = false; onMenu2 = true; // prevents the miniature and the quit button from poping on top of the darkened screen // darken screen (black transparent sprite of the size of the screen) darkScreen = game.add.graphics(0, 0); darkScreen.beginFill(0x000000, 1); darkScreen.alpha = 0.5; darkScreen.drawRect(0, 0, SIZE_X, SIZE_Y); // White box showQuitMessage = game.add.graphics(0, 0); showQuitMessage.beginFill(0xFFFFFF, 1); showQuitMessage.drawRect(SIZE_X * 0.2, SIZE_Y * 0.15, SIZE_X * 0.6, SIZE_Y * 0.7); // Text output quitTitleSprite = game.add.text(SIZE_X * 0.4, SIZE_Y * 0.3, quitTitle, {font: 'bold ' + Math.floor(SIZE_Y / 15) + 'pt Arial', fill : '#000'}); quitMessageSprite = game.add.text(SIZE_X * 0.325, SIZE_Y * 0.45, quitMessage, {font: Math.floor(SIZE_Y / 30) + 'pt Arial', fill : '#000'}); // exitButton && unpauseButton graphics exitButton = game.add.graphics(0, 0); exitButton.beginFill(0x81DEED, 1); exitButton.drawRect(SIZE_X * 0.35, SIZE_Y * 0.65, SIZE_X * 0.1, SIZE_Y * 0.06); exitButtonText = game.add.text(SIZE_X * 0.38, SIZE_Y * 0.665, quitButton1Text, {font: Math.floor(SIZE_Y / 40) + 'pt Arial', fill : '#000'}); unpauseButton = game.add.graphics(0, 0); unpauseButton.beginFill(0x81DEED, 1); unpauseButton.drawRect(SIZE_X * 0.55, SIZE_Y * 0.65, SIZE_X * 0.1, SIZE_Y * 0.06); unpauseButtonText = game.add.text(SIZE_X * 0.58, SIZE_Y * 0.665, quitButton2Text, {font: Math.floor(SIZE_Y / 40) + 'pt Arial', fill : '#000'}); // exitButton && unpauseButton clicking gestion unpauseButtonHitBox = new Phaser.Rectangle(SIZE_X * 0.55, SIZE_Y * 0.65, SIZE_X * 0.1, SIZE_Y * 0.06); exitButtonHitBox = new Phaser.Rectangle(SIZE_X * 0.35, SIZE_Y * 0.65, SIZE_X * 0.1, SIZE_Y * 0.06); game.input.onDown.add(function(pointer) { if (onMenu2) { if (unpauseButtonHitBox.contains(pointer.x, pointer.y)) { unpauseGame(game, gameBoard, 2, showQuitMessage, unpauseButton, exitButton, darkScreen, quitTitleSprite, quitMessageSprite, unpauseButtonText, exitButtonText); miniature.inputEnabled = true; quitButton.inputEnabled = true; } else if (exitButtonHitBox.contains(pointer.x, pointer.y)) location.reload(true); } }); });Pausing function : function pauseGame(game, gameBoard) { for (var i = 0; i < NB_CELL_Y; i++) { for (var j = 0; j < NB_CELL_X; j++) { gameBoard.puzzle[i][j].sprite.inputEnabled = false; } } }Quitting the quitting menu code (or unpause function) : // After the menu argument, all args must be sprites and they will all be destroyed function unpauseGame(game, gameBoard, menu) { var i; if (menu == 1) // full picture Menu onMenu = false; // useful for stopping some sprite events, and starting others else if (menu == 2) // exit Menu onMenu2 = false; // Allows the sprites to be moved again if (onMenu == false) // the game can't go back to it's normal behavior if we're still on the full picture menu { for (i = 0; i < NB_CELL_Y; i++) { for (var j = 0; j < NB_CELL_X; j++) { gameBoard.puzzle[i][j].sprite.inputEnabled = true; } } } // deletes the sprites that made the menu for (i = 3; i < arguments.length; i++) { console.log("arg["+i+"] destroyed."); arguments[i].destroy(); } }Here's the console log : inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startpuzzle_plus.js:316 arg[3] destroyed.puzzle_plus.js:316 arg[4] destroyed.puzzle_plus.js:316 arg[5] destroyed.puzzle_plus.js:316 arg[6] destroyed.puzzle_plus.js:316 arg[7] destroyed.puzzle_plus.js:316 arg[8] destroyed.puzzle_plus.js:316 arg[9] destroyed.puzzle_plus.js:316 arg[10] destroyed.phaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled false d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: true, priorityID: 0, useHandCursor: false…}phaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}_dragPoint: d.Point_pointerData: Array[10]_tempPoint: d.PointallowHorizontalDrag: trueallowVerticalDrag: trueboundsRect: nullboundsSprite: nullbringToTop: falseconsumePointerEvent: falsedragFromCenter: falsedragOffset: d.Pointdraggable: trueenabled: truegame: d.GameisDragged: falsenext: d.InputHandlerpixelPerfect: falsepixelPerfectAlpha: 255prev: d.InputHandlerpriorityID: 0snapOffset: d.PointsnapOnDrag: falsesnapOnRelease: falsesnapX: 0snapY: 0sprite: d.SpriteuseHandCursor: false__proto__: Objectphaser.min.js:6 InputHandler startphaser.min.js:7 inputEnabled true d.InputHandler {sprite: d.Sprite, game: d.Game, enabled: false, priorityID: 0, useHandCursor: false…}phaser.min.js:6 InputHandler startpuzzle_plus.js:316 arg[3] destroyed.puzzle_plus.js:316 arg[4] destroyed.puzzle_plus.js:316 arg[5] destroyed.puzzle_plus.js:316 arg[6] destroyed.puzzle_plus.js:316 arg[7] destroyed.phaser.min.js:7 Uncaught TypeError: Cannot read property 'parentNode' of nullActually I'm talking of sprite but there's some text and graphics too, but since it works the first time I guess ."destroy()" works on them too. If you neef any more info I'll be glad to give it, sorry if I'm not very precise and for the high number of lines of code. Thanks in advance! Stupid PS : Is it me or does Syntax Highlighting in the code balise has a serious problem (or more precisly is inexistant).
-
- pause menu
- error
-
(and 1 more)
Tagged with:
-
For example: ...var slide_container_4 = new PIXI.container();var texture = PIXI.Texture.fromVideo(url);var video = new PIXI.Sprite(texture);slide_container_4.addChild(video);...How to destroy video from memory?
-
Hello, I noticed that events attached on bitmapText objects tend to linger/persist even after the item has been removed/destroyed from the group or even after the group has been destroyed. Does anyone have any idea why is this happening? or how to solve this? I'm attaching the event like this text.inputEnabled = true;text.events.onInputDown.add(fn, this);Thanks!