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

The flash effect in Juicy does not work #9

Open
SomMeri opened this issue Mar 13, 2015 · 1 comment
Open

The flash effect in Juicy does not work #9

SomMeri opened this issue Mar 13, 2015 · 1 comment

Comments

@SomMeri
Copy link

SomMeri commented Mar 13, 2015

I did not succeeded in making flash work. This is how I use it:

create: function() {
    this.juicy = this.game.plugins.add(new Phaser.Plugin.Juicy(this));
    this.flash = this.juicy.createScreenFlash('#ff0000');
    // .... 
},
update: function() {
        this.flash.flash(); //does not work
        this.juicy.shake(20, 20); //this works
    // .... 
}

Console contains no error, but nothing happen. Juicy is loaded correctly, because the shake function works fine.

The flash tween definition is also suspicious, because it does not use the duration variable.

@duzhi5368
Copy link

Hi,you'd better have a look this page: http://phaser-juicy.herokuapp.com/
And you can update your code like this:


create: function() {
    this.juicy = this.game.plugins.add(new Phaser.Plugin.Juicy(this));
    this.flash = this.juicy.createScreenFlash();
    this.add.existing(this.screenFlash);
    // .... 
},
update: function() {
        this.flash.flash(); // will ok
        this.juicy.shake(20, 20); //this works
    // .... 
}

Good luck.

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

2 participants