Jump to content

Search the Community

Showing results for tags 'call'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 7 results

  1. Hello, So I actually have the following code that works: var player; var box_tnt; function create (){ this.physics.add.collider(player, box_tnt, hitTnt, null, this); } //the function hitTnt stop the game because the player died function hitTnt (player, boxes){ this.physics.pause(); player.setTint(0xff0000); player.anims.play('default'); gameOver = true; } and I want to do something like: var player; var box_tnt; function create (){ this.physics.add.collider(player, box_tnt, hitTnt, null, this); } //the function hitTnt stop the game because the playe
  2. Refer to the link below, for billboard enabled meshes, I added mouse pick event so the camera will target to the mesh which being clicked. However, after click on the mesh which BILLBOARDMODE_ALL is enabled, I got the following error. I'd be really appreciated if anyone can fix this issue. Thanks. https://www.babylonjs-playground.com/#9XBPW4#2 if (!m.actionManager){ m.actionManager = new BABYLON.ActionManager(scene); } var act = new BABYLON.ExecuteCodeAction( BABYLON.ActionManager.OnPickTrigger, pick ); m.actionManager.registerActi
  3. Hello, I am new to Phaser and I am trying to get a player extends from a sprite and display it in the screen but I am not being able and I don't know why. If anyone could help me It would be appreciated. Thank you. this is my code play.js player.js game.js
  4. Hello, recently I found code that is defining objects inheriting from Phaser.Sprite (if I google'd it and understood correctly). Can someone explain a little more about Phaser.Sprite.call() function? I haven't found it anywhere in docs. Also, what are the possible parameters? I found an example of code on some flappy bird tutorial : Pipe = function (game, x, y, speed) { Phaser.Sprite.call(this, game, x, y, "pipe"); game.physics.enable(this, Phaser.Physics.ARCADE, this); this.body.velocity.x = speed; this.giveScore = true; }; Pipe.prototype = Object.create(Phaser.Spr
  5. So typically you have a function that switch to another state that call be call via a button or sprites this.btn_gameOver = this.game.add.button(this.game.width/2, 500, 'btn_play', this.start_gameOver, this);this.btn_gameOver.anchor.setTo(0.5,0.5);},start_gameOver: function(){ this.game.state.start('gameover', true, false, GameScore); } However when I use it within another function (updateTimer), once the countdown reached 0 and triggered, it return an error Uncaught TypeError: Cannot read property 'game' of undefined updateTimer: function(){ GameTimer--; txt_timer.tex
  6. 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.a
  7. I want save data, like level no, score and game progress. Can we do this with phaser js?
  • Create New...