New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use 'this.add.renderTexture' and then 'game.destroy(true)' error. #4849
Comments
Your example works fine for me, as long as I don't use Here's a test I created: http://labs.phaser.io/view.html?src=src%5Cgame%20objects%5Crender%20texture%5Cdestroy%20game%20with%20render%20texture.js&v=dev |
Thank you. Hopefully there will be more information about using Phaser to create games with aspects like this that require special processing for development. Thank you.(谢谢您。希望有多一些关于使用Phaser创建游戏 像这种需要特殊处理方面的介绍便于开发,谢谢。) |
Sorry for duplicated issue (#4876). var config = {
type: Phaser.AUTO,
parent: 'phaser-example',
width: 800,
height: 600,
backgroundColor: '#2d2d88',
scene: {
preload: preload,
create: create
}
};
var game = new Phaser.Game(config);
var rt;
var bubbles = [];
function preload ()
{
this.load.image('dude', 'assets/sprites/phaser-dude.png');
}
function create ()
{
rt = this.add.renderTexture(0, 0, 80, 80);
var circle = this.add.circle(0, 0, 40, 0x6666ff).setAlpha(0.5).setVisible(false);
rt.draw(circle, 40, 40);
rt.draw('dude', 24, 20);
this.input.on('pointerup', function () {
game.destroy(true);
});
} Error message will still show on console. |
这样可以解决问题,我觉得Phaser官方应该修复解决这个问题。 |
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the |
The text was updated successfully, but these errors were encountered: