JackAttack Posted August 5, 2017 Share Posted August 5, 2017 So my code currently looks like: this.game.camera.fade(0x112C06, 1500, true); this.game.camera.onFadeComplete.add(this.goToZone(), this); However this.goToZone() is fired immediately, not after 1500 miliseconds. The fade effect does not show at all. If I comment out the onFadeComplete line, the fading does happen successfully. I've tried putting the onFadeComplete line before the fade line, but it has no effect. Does anyone know what is missing here? I'm using Phaser CE 2.8.3. Link to comment Share on other sites More sharing options...
JackAttack Posted August 5, 2017 Author Share Posted August 5, 2017 Issue solved, the reference to goToZone should not have the brackets. So: this.game.camera.onFadeComplete.add(this.goToZone, this); works as expected. Link to comment Share on other sites More sharing options...
Recommended Posts