Jump to content

Krasen

Members
  • Content Count

    2
  • Joined

  • Last visited

About Krasen

  • Rank
    Newbie

Contact Methods

  • Twitter
    krasen007
  1. The problem appears that the tween has to be completed before setting the State, but I must not be able to click on the Tile. What I tried is to set a boolean isAnimating to true when starting the tween and isAnimating to false when the state is set to CLOSED or OPEN. Then I added a check if ((this.currentState == TileState.CLOSED) && (this.isAnimating == false)) { this.startFlip(); this.tileClick.dispatch(this.uniqueId); } else { this.tileClick.dispatch(this.uniqueId); console.log("Tile is open, so do nothing."); } however I still get bugs, when I click on some other Tile
  2. Hello, I am making a simple Matching game, that uses phaser tween animation to tween the animation for flipping game tiles. when the tile is flipped I need to set a state to OPEN or CLOSED however its currently using 4 methods to do the flip. I want to make it faster, so the user can not click on a new tile before the last one is completed here are 2 examples: I am writing the app in typescript. // Main.ts NEW click methods public startNewFlip():void { var tileNewTween:Phaser.Tween; tileNewTween = this.game.add.tween(this.face.scale).to({x: 0}, 300, Phaser.Easi
×
×
  • Create New...