Skip to content
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

In Phaser 3 - Armature no wanna loading after scene changing! #143

Open
MadDogMayCry0 opened this issue Jun 25, 2020 · 1 comment
Open

Comments

@MadDogMayCry0
Copy link

MadDogMayCry0 commented Jun 25, 2020

After scene changing armature stops loading, when it's has a same name.
Pls, fix it.
And animation stops working after scene.scene.restart();

<script>
		let config = {
			type: Phaser.WEBGL,
			<!-- physics: { -->
			<!-- default: 'arcade', -->
			<!-- arcade: { -->
				<!-- gravity: { y: 300 }, -->
				<!-- debug: false -->
			<!-- } -->
			<!-- }, -->
			scale: {
				mode: Phaser.Scale.FIT,
				autoCenter: Phaser.Scale.CENTER_BOTH,
				width: 1920,
				height: 1080
			},
			audio: {
				disableWebAudio: true
			},
			plugins: {
				scene: [
					{ key: "DragonBones", plugin: dragonBones.phaser.plugin.DragonBonesScenePlugin, mapping: "dragonbone" }
				]
			},
		};

	var SceneA = new Phaser.Class({

    Extends: Phaser.Scene,

    initialize:

    function SceneA ()
    {
        Phaser.Scene.call(this, { key: 'sceneA' });
    },

    preload: function ()
    {
        this.load.dragonbone("doc",
	"characters/doc/doc_tex.png",
	"characters/doc/doc_tex.json",
	"characters/doc/doc_ske.json");
    },

    create: function ()
    {
        this.add.armature("doc_test", "doc");

        this.input.once('pointerdown', function () {
           this.scene.start('sceneB');

        }, this);
    }

});

var SceneB = new Phaser.Class({

    Extends: Phaser.Scene,

    initialize:

    function SceneB ()
    {
        Phaser.Scene.call(this, { key: 'sceneB' });
    },

    preload: function (){
        this.load.dragonbone("doc",
	"characters/doc/doc_tex.png",
	"characters/doc/doc_tex.json",
	"characters/doc/doc_ske.json");
    },

    create: function ()
    {
		this.add.armature("doc_test", "doc");
       		
		this.input.once('pointerdown', function (event) {
           this.scene.start('sceneA');

        }, this);
    },

    update: function (time, delta){
       
    }

});

var game = new Phaser.Game(config);
game.scene.add('SceneA', SceneA);
game.scene.add('SceneB', SceneB,true);
</script>
@MadDogMayCry0 MadDogMayCry0 changed the title Armature no wanna loading after scene changing! In Phaser 3 - Armature no wanna loading after scene changing! Jun 25, 2020
@MadDogMayCry0
Copy link
Author

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant