Jump to content

jzcodes

Members
  • Content Count

    7
  • Joined

  • Last visited

About jzcodes

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I'm working on a racing game and I have a character select screen that allows the player to choose between 3 variations of the same character (blue, pink, purple). In my main.js I have a global variable to hold the character value (blue, pink or purple). In stateChoice.js I have 3 buttons, and I am using .bind. When the player chooses the global variable becomes whatever color they picked. However, in my mainState.js I have the game and I'm currently using a ton of repetitive code to say if (character == 'blue') { // add this sprite , etc. etc.}. Obviously, this is not ideal sinc
  2. @Garlov Oh! That is really interesting!! I've never heard of this before and I can't wait to look into it, this sounds perfect!! Thank you so so much!!!!
  3. Hi, I'm still pretty new to Phaser and I'm making a character select screen that shows all of the characters (only 3). Each one has a button that looks like a power on/off switch. When you click the button it should toggle the button to the correct frame ("on"), but if you click another character it should switch "off" the button of the previously chosen character and turn the currently chosen button to "on." The toggling was one issue, this was the best thing I could think of (it works, but it ends up being repetitive since there are 3 characters): //Button this.pickPink = game.add
  4. I figured it out!! It was a little tricky to find a clear description of the params but, this is what I did! var tween1 = game.add.tween(this.countDown1).to({alpha: 1}, 500, Phaser.Easing.Linear.None, false, 0).to({alpha: 0}, 500, Phaser.Easing.Linear.None, false, 0); var tween2 = game.add.tween(this.countDown2).to({alpha: 1}, 500, Phaser.Easing.Linear.None, false, 0).to({alpha: 0}, 500, Phaser.Easing.Linear.None, false, 0); var tween3 = game.add.tween(this.countDown3).to({alpha: 1}, 500, Phaser.Easing.Linear.None, false, 0).to({alpha: 0}, 500, Phaser.Easing.
  5. Hello, I'm making a racing game (at least I'm trying to!) I'm using a setTimeout function to delay the start of the scrolling of the background by 3 seconds which works perfectly! But, what I really need now is to display an image of "3" *pause & fade out*, switch to image of "2" *pause & fade out*, switch to "1" *pause & fade out* then show "Go!" * fade out* I saw something where I set the alpha to 0 and then tween the alpha to 1 like so: game.add.tween(this.countDown).to({alpha: 1}, 1000, Phaser.Easing.Linear.None, true, 0, 1000, false); But this isn't ex
  6. Ohhh okay awesome!!! I figured I would have to use some sort of timer but I've never used them in Phaser before!! And I just so happened to watch a video on a scrolling background the other day. Thank you so much ! I can't wait to play with this!
  7. Hello! I wasn't sure what to call it but I am working on a game with my husband (terrible idea, he's a designer..) and he asked if I could create a menu screen that plays out a little scene or something. He showed me this video as an example of Mario Kart SNES (only watch the first 35 seconds of so): https://www.youtube.com/watch?v=AlAmXXNz5ac I am aware of how to use states and all but, I only just started using Phaser and I was trying to think out how I would create something similar to the scene played out in the example (Maybe something not so complex), also if this is possible h
×
×
  • Create New...