Jump to content

Search the Community

Showing results for tags 'technical problem'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello everyone! apologize in advance for my poor English. The thing is I've been working on a mini game of roulette machines, I have divided my game with gameStates(boot, gameStates, load, stand, play, win and lose). so some mechanics is: to start the state of play should create an image preloaded on my state of load, this will be a zodiac sign, then press the space key image should be removed and display a sprite sheet which is appended an animation. Something like this: var winState = { create: function(){ //Este estado servira de test para presion/accion de boton... var sta1 = game.add.image(300, 150, 'geminis'); sta1.scale.setTo(0.2); game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); if(game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR)){ rotateAnim(); } }, rotateAnim: function(sta1){ sta1.destroy(); var sta2 = game.add.image(300, 150, 'signos'); sta2.animations.add('rotate'); sta2.animations.play('rotate', 1, true); }};BUT I didn't get the expected result. The only thing I desired result is obtained with the method onInputDown (Mouse): //In Create: Function();var sta1 = game.add.sprite(170, 360, 'leo');sta1.scale.setTo(0.17);sta1.anchor.set(0.5);sta1.inputEnabled = true;sta1.events.onInputDown.add(this.stopAnim, this);stopAnim: function(sta1){ //game.state.start('stand'); sta1.destroy(); var signos = game.add.sprite(170, 360, 'signos'); signos.scale.setTo(0.17); signos.anchor.set(0.5); signos.animations.add('change'); signos.animations.play('change', 5, true); }could someone tell me I'm doing wrong or that I needed to get the same result when you press a key. Thanks a lot for answers!
×
×
  • Create New...