Jump to content

Appolos

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. Hello ! I need to create a block in center of screen with text. How to set this block and text set to center of screen ?? My code: this.graphics = this.add.graphics(0, 0); // this.graphics.pivot.set(0.5,0.5) this.menuText = this.add.text(0, 0, text, textStyle); this.graphics.beginFill(0xf9cb9c); this.graphics.drawRect( this.game.world.centerX / 2, this.game.world.centerY / 2, this.game.world.width / 2, this.game.world.height / 2 ); this.menuText.setTextBounds( this.game.world.centerX / 2, this.game.world.centerY / 2, t
  2. have game on Phaser 2, I start integrate it in Facebook. And have some problem with function that allow user to share with friends. 1)Here example of code: let msg = 'Try this game' FBInstant.shareAsync({ intent: "REQUEST", image:user.playerPic, text: "Hey I'm stuck on this target! Can you help me?", data: {myReplayData:msg} }).then(() => { console.log("Success share"); this.resumeGame = true; this.checkStatusContinue(); }); 2) Here my error: POST https://m.facebook.com/games/quicksilver/share_score/ 500 ErrorUt
  3. Hello everyone ! I am new in Phaser, and I have some simple game on Phaser 2. And problem in what I have in game the target with some health, and the game end`s when targets health equal to zero, but then i go back to main menu and when I again go to game state the targets health already equal to zero. 1) Targets settings: class Target { constructor(health, viewPath) { this.health = health; this.viewPath = viewPath; } hit() { this.health -= 5; } } // creating Targets let wooden = new Target(10, "assets/targ.png"); let bear = new Target(20, "a
  4. Hello ! I have to variants - Phaser 3 and Phaser 2 tween creation I try to rewrite from 3d version to 2nd versions. Here, that I created: 1)Phaser 2: let sliceCoin = this.game.add.tween(this.coin, slice) sliceCoin.to({ y: game.config.height + this.apple.height, // x destination x: { // running a function to get different x ends for each slice according to frame number getEnd: function (target, key,
  5. Hello ! Can anybody help with Tween in Phaser. I need rewrite adding tween to game from Phaser 3 to Phaser 2. I have this code, how I can write it on Phaser 2. this.tweens.add({ // adding the knife to tween targets targets: [this.knife], // y destination y: this.target.y + this.target.width / 2, // tween duration duration: gameOptions.throwSpeed, // callback scope callbackScope: this, // function to be executed once the tween has been completed onC
  6. Hello ! I created a group in my game, and I have arrows (left / right), and that's what I can not do: 1. I need to select only one element at a given time. 2. After pressing the left or right arrow, I need to move one element of the group to the next (for example, a slider). Please help to do this! Thanks !) Here is my code: this.rightArrow= this.add.sprite(game.config.width / 2+280, game.config.height/2,'rightArrow') .setScale(0.3) .setInteractive() .customParams = {direction:-1} this.left= this.add.sprite(game.
  7. Hello! Thanks for answer and creating this plugin. I want ask you how to use your plugin for creating display that resize to mobile screen size (creating response game) If you can help I'll be very grateful you.
  8. Hello! Thanks for answer and creating this plugin. I want ask you how to use your plugin for creating display that resize to mobile screen size (creating response game) If you can help I'll be very grateful you.
  9. I`m use in creating simple game - ES6 syntax, and I cannot add plugin to my game (phaser-plugin-game-scale). Help me and explain how to use plugin in ES6 syntax. Thanks!!
×
×
  • Create New...