jorge.graca

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. Hi, I have the same issue when I do //this.stage.preUpdate(); on the UpdateLogic the game runs smooth but when added it spikes a lot. I have no physics in my game, why does this happen?
  2. As is illustrated in the example attached the issue is not the fadeout, the issue is that the next sound that is played with mute on always plays. That is clearly an issue, why would there be a fadeout on a new sound after the mute has been switched? I could do the "if" you mention, in all sounds I play in the entire game... I rather that "if" to be inside the play function at least. Hence, the Phaser issue.
  3. That has exactly the same artifact, has is demonstrated in the attached example.
  4. Hi all, I am using sound sprites to make tiny button sounds, however when I place the mute=true on the sound manager the button still plays the first time (not the following) after the system was muted. Is this a know bug? preload: function() { this.load.audio('button_press', 'button_press.wav');},create: function() { this.clickSound = new Phaser.Sound(this.game, 'button_press'); this.clickSound.play();//plays sound this.game.sound.mute = true; this.clickSound.play();//also plays sound (only the first few moments)} Thanks. phaser mute issue.zip
  5. Thanks! That does indeed do what I wanted Just need to take care with the overhead created by constant pixel checking, thanks.
  6. Hi Skeptron, Not really, it is just that the when the button is pressed it reduces it's size visually. I wanted to represent that in the hit box, so that when you drag out the mouse while not releasing the button, it would pop-out (became unpressed) at the new smaller edge instead of the bigger original edge. Does that make sense?
  7. Hi all, I am trying to extend the Phaser.Button to have different hit-areas depending on it's state: this.onInputDown.add(() => {this._isDown = true;let tempPhaserFrame = game.cache.getFrameByName(key, frameDown);if (tempPhaserFrame instanceof Phaser.Frame) {this.hitArea = tempPhaserFrame.getRect();// this.hitArea.offset(-this.anchor.x * this.hitArea.width, -this.anchor.y * this.hitArea.height);console.log(this.hitArea);}});However, when I do this the button immediately gets unpressed once the hitArea is changed. Why is this? How could I achieve a variable sized button hit check? Thanks.