Le Twitch

Members
  • Content count

    57
  • Joined

  • Last visited

About Le Twitch

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Sydney, Australia

Recent Profile Visitors

444 profile views
  1. Le Twitch

    pie timer method and efficiency

    I've found 3 ways of doing a pie timer and I was wondering which one is the most efficient. 1. Assets - 2 semicircles and 1 circle Method - 2 semicircles are inside 1 circle, both on the same side. They are masked so that they are invisible. Both semicircles rotate out of the mask until they are 180 degrees from their starting point and which then the mask is deleted. 1 of the semicircles stay in it's position while the other continues to rotate until it complete's it's 360 degree rotation. 2. Assets - 2 circles Method - 1 circle is on top of the other. The top one is hidden. A mask is used to reveal the top circle using this method http://flassari.is/2009/11/pie-mask-in-as3/ 3. Assets - 1 circle and multiple small rectangles Method - The small rectangles are invisible, on top and surround the inner arc of the circle. The rectangles are revealed one by one, based on time.
  2. Le Twitch

    How does group.addMultiple work?

    Ahh okay. Thanks!
  3. Le Twitch

    How does group.addMultiple work?

    Does group.addMultiple work the same as group.add, except you can add all the objects to the group in one line? If so, how do you write it?
  4. Le Twitch

    How to call a variable in another state?

    Yes ScoreMenu is a state itself and I have to call it with game.state.start() Accessing variables in an active state isn't the problem. I want to have global variables that can be accessed from any state. Main.game was a typo, it should be Main.Game Which template is this?
  5. Main.Game = function (game) { this.score = 0;};Main.Game.prototype = { create: function() { }};Main.ScoreMenu = function (game) {};Main.ScoreMenu.prototype = { create: function() { console.log(Main.Game.score); }};How do I call a variable in another state? The above method is obviously wrong since it doesn't work.
  6. Le Twitch

    best way to do a pie timer?

    would that be considered the best way to do it though?
  7. Le Twitch

    best way to do a pie timer?

    What is the best way to do a pie timer in phaser, similar to this, but starting as a full circle. https://codepen.io/agrimsrud/pen/EmCoa
  8. Le Twitch

    Need help for a start button

    Do I need to kill the sprites created in previous states?
  9. Le Twitch

    Need help for a start button

    Before the game starts, I want to have a start button and nothing else in the game besides the background. What is the best way of doing this? Should I have the sprites created, hide them and disable their functions until the start button is pressed or create the sprites themselves once the start button is pressed? If the second option, how would you go about it?
  10. I have a phaser project within a container and I can't add a border radius to the container for some reason. Here's the code. http://codepen.io/anon/pen/Cshow
  11. Le Twitch

    Tinting always turn out black. need help

    Ahh okay. Thanks for the info
  12. Le Twitch

    Tinting always turn out black. need help

    Thanks for the help, it works now. Now I have another problem :S 0x000000 which is black, doesn't work
  13. I'm trying to tint a bitmap text and no matter what colour I choose, it always comes out black. the text is completely white.
  14. Le Twitch

    how to update bitmapFont

    " bitmapText.font = 'font'; " isn't exactly working for me. It's within an onInputDown function. Maybe i'm doing it wrong :S
  15. Le Twitch

    how to update bitmapFont

    So technically i could do "bitmapText.text" instead of "bitmapText.setText"