Jump to content

Search the Community

Showing results for tags 'key'.

  • 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
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

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 15 results

  1. I'm working on a simple platformer in my spare time with Phaser 3 and I'm currently working on trying to tighten up my controls. Currently I'm trying to prevent jump spamming so that every jump is an intentional action taken by the player. One press of the jump button should translate to only one jump being performed (ie, key must be released to jump again). Looking at the `Key` class, each key has a property of interest: `_justDown`. This appears to be the property I should use, however it's always `true`. Digging into the source code for v3.1.0 the only time this property is modified is
  2. I've been struggling to figure out if the "_justDown" property of a key is working properly or not. It seems to always be true as long as the key is held just like "isDown" when accessed directly (ex: someKey._justDown). It seems that the intention is to use the Phaser.Input.Keyboard.JustDown() getter method, but it returns the same results as key.isDown and key._justDown (ex: Phaser.Input.Keyboard.JustDown(someKey)) If this is a bug then I'm comfortable enough to try and make a fix, but I figured I should first see if I'm misunderstanding how to use it in the first place. (Usin
  3. Hi guys, I just started out with Phaser and I was thinking about creating a basic game with a guy jumping around from scratch. I searched this website for an answer but I couldn't actually find one that fits or I was too stupid to understand it. So why when I want to create an image on the canvas it says "Phaser.Cache.getImage: Key "jucator" not found in Cache." ? Here's my code: <html><head><meta charset="UTF-8" /><title>Dani Mocanu runs</title><script type="text/javascript" src="JS/phaser.min.js"></script></head><body><script type="te
  4. Hi, I'm programming a simple platformer game, and I'm programming and setting the movement of the player. Here's my update function: update: function () { game.physics.arcade.collide(this.player, this.platform); game.camera.follow(this.player); if(this.cursor.right.isDown){ this.player.body.velocity.x= 200; this.player.animations.play('correr', 5, true); this.player.scale.x=1; } else if(this.cursor.left.isDown){ this.player.body.velocity.x= -200;
  5. Hi, In a menu state of mine, instead of pressing spacebar, I would like to let the player press any key to continue. What would be the best way to detect if any key is pressed?
  6. i have change fbx file to babylon, and it have walk, run animaion. in default, it start walk animation. like sketchfab. https://sketchfab.com/models/0edde6accc4a4d92919bbbbaf824d849 how get the animation key and change the animation?
  7. I already found the solution for my problem. Please delete this topic.
  8. Hi, I want to allow a key that was added with "theKey = game.input.keyboard.addKey(Phaser.Keyboard.A)" to be propagated up to the browser without having to remove the key capture with "game.input.keyboard.removeKeyCapture(Phaser.Keyboard.A)". I want to do this because on the page where the Phaser window is, there is also a comment section where those letters actually can not be typed. I do not want to remove key capture because then I will need to use "theKey.onDown.add(function)" and this function will only be called one time ( I want the key to repeat some action as long as it
  9. Hi, I'm currently working on a tile base RPG game using Phaser. function create(): controls = { up: game.input.keyboard.addKey(Phaser.Keyboard.Z), (...), shift: game.input.keyboard.addKey(Phaser.Keyboard.SHIFT) }; } If I press Z, my character needs to move and if I press SHIFT + Z, my character has to rotate towards the Z direction. function update() : if (controls.shift.isDown) { if (controls.up.isDown){ rotateCharacter(); } } else { if (controls.up.isDown){ moveCharacter(); } } Right now, when try to rotate my character using SHIFT +
  10. So, first of all, I am new to Phaser, but I work as a programmer. I have some knowledge about how 3D modelling tools work , even for animation. I am wondering if someone can give me more info about this. What i've got: a bunch of static images ( no spritesheets, no texture maps, only static images) My question is: Is there any way to program like keyframes (like blender3d) in order to specify position, scale and rotation to the elements i want on the screen , also layering and something like opacity? Is there any way people have done this with particle effects? How would you proceed abo
  11. I have a problem: I can't figure out how to move a sprite with multiple keys pressed at once. A little more explanation: Button W moves the sprite Up Button S moves the sprite Down When pressed separately, it works just fine. The problems begin when I try to press several buttons at once. Problems: 1. Player presses W, and then S. What happens: W is ignored, S is processed. Sprite moves down. What is supposed to happen: Both W and S are processed. Sprite remains stationary (because both "UP" and "DOWN" buttons are pressed at once). 2. Player presses W, and then S, and then releases W. What
  12. I need help function of the key to save time pressing a key. example if you press to perform a function if held down after a set time q pass to run another function
  13. I uploaded the game on fgl. The game gets put in a iframe. While in firefox it works fine, in Chrome it seems to have a problem. When the keys on keyboard get pressed, nothing happens in the game, instead it is the window that moves when pressing the up and down keys. I entered the following code game.system.canvas.focus(); and game.system.canvas.setAttribute('tabindex','0'); and somehow the keys now work for the game. But the keys still move the window as a whole. Is there a way to focus only the canvas?
  14. So, I'm looking through the keyboard docs in order to find a function for buttons being pressed as opposed to being held down. Say I'm firing a bullet, I only want one bullet spawned per button press, regardless of how long the button is held down. I have achieved this with raw JavaScript earlier using a boolean: isButtonADown = false;if(buttonA){ if(!isFiringButtonDown){ console.log("Shot fired."); isFiringButtonDown = true; }}else{ isFiringButtonDown = false;}Is there anyting like this implemented in Phaser?
  15. Hi all, I searched a long time for a callback that would be called each update when a key is pressed, like a key.onHold.add(this.onHold, this); I wasn't able to find anything close in the doc or the forum, so I decided to do my own manager, and share it here. Bascically the usage is like that : this.keyManager = new InputKeyEventsManager(game,this); That creates an Instance of InputKeyEventsManager. It "inherits" from Phaser.Sprite so the update is automatically called from the game. The parameters are : - the current game reference - the targeted object, on which the callback will b
×
×
  • Create New...