Jump to content

Search the Community

Showing results for tags 'Remember position'.

  • 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. Please tell me how to get the player to memorize the position (left / right)? Let me explain what I mean: Let's say I want to shoot a potential enemy, I have a number of conditions for to make a shot: if (cursors.left.isDown) { bullet.body.velocity.x = -400; } else if (cursors.right.isDown) { bullet.body.velocity.x = 400; } else { bullet.body.velocity.x = 400; } Now if i turn left/right, my character begin to run in this direction Based on the above, it turns out that the bullet flies only in the direction in which I pressed the button (left or right). I would like that when you press the "left", my character has remained in this position until I press the "right" (or any other). Thank you, any ideas?
×
×
  • Create New...