Sign in to follow this  

sound fade in to custom volume

Recommended Posts


the sound 


look like a good option but is is unusable for me when i cant set the end volume. 
in the docs i not see option for that but in my game the player can set music volume.
someway can i solve this problem?
ty for any advice

Share this post

Link to post
Share on other sites
Phaser.Sound.fadeIn.prototype = function (duration, loop, customVolume) {        if (typeof duration === 'undefined') { duration = 1000; }        if (typeof loop === 'undefined') { loop = false; }        if (typeof customVolume=== 'undefined') { customVolume= 1; }        if (this.paused)        {            return;        }'', 0, 0, loop);        var tween = { volume: customVolume }, duration, Phaser.Easing.Linear.None, true);        tween.onComplete.add(this.fadeComplete, this);    },

is it possible? im rly newby. pls help with syntax

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.