Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

AnimatedSprite.prototype.update doesn't update (RPG Maker MV)

$
0
0

I am trying to write a plugin for RPG Maker MV, which uses Pixi.js.

The problem may be an incompatibility, but I have asked several people now and I just don't know where else to ask.

The PIXI Version I tried it on was 4.5.4

 

Kreaturen.Kampfsystem.StarteKampf = function () {
        // Kampf Übergang
        
        for (var i = 1; i <= Kreaturen.Kampfsystem.KampfÜbergang.AnzahlFrames; i++) {
            Kampf_Anfang.frames.push(PIXI.Texture.fromImage(Kreaturen.Kampfsystem.KampfÜbergang.Pfad + i + '.png'));
        }

        Kampf_Anfang.anim = new PIXI.extras.AnimatedSprite(Kampf_Anfang.frames);
        console.log(' Kampf_Anfang.anim: ',  Kampf_Anfang.anim);
        Kampf_Anfang.anim.animationSpeed = 0.5;
        Kampf_Anfang.anim.loop = false;
        Kampf_Anfang.anim.gotoAndPlay(0); // force reset frame
        
        Kampf_Container.addChild(Kampf_Anfang.anim);
        SceneManager._scene.addChild(Kampf_Container);

        Kampf_Anfang.anim.onComplete = function() {
            console.log(88888)
          Kreaturen.Kampfsystem.KampfAktiv = true;
        }
        
        
    }

Everything works fine, the picture gets displayed but the animation just doesn't play... And because of that the .onComplete function never triggers

Does anybody have an idea why this may occur?

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>