fitness23

Members
  • Content Count

    73
  • Joined

  • Last visited

About fitness23

  • Rank
    Advanced Member

Recent Profile Visitors

959 profile views
  1. @WizaEric I really like this! If I could add it might be nice if you can add a progress bar in that one for loading there don't seem to be many resources telling you how to do it at the moment.
  2. I think this is the most comprehensive one out there = https://github.com/troyedwardsjr/phaser3-typescript-webpack
  3. fitness23

    Brunch with Phaser 3 (starter project)

    Hi everyone, I love this! Does anyone have a Typescript version set-up already of this I could have? I'm struggling to get my head around this and would prefer to stick with the Typescript route. Many thanks, Andrew.
  4. fitness23

    Phaser Scaling Question

    Sorry your question is a little confusing. What do you mean by padded sprites? Do the grey areas still belong to the games canvas?
  5. fitness23

    Memory usage increases 10x after sound loading

    It's best practice to stage loading files. 23mb is a lot to load right from the outset. Try only loading sounds just before the scene where they are to be used. Then after that scene clear the cache before you load the new ones needed for the next scene.
  6. fitness23

    Make sprite tween along an arc

    Hmm thanks. I'm still confused as to how I'm going to get the co-ordinates of the arc in the first place though. I need to know those before I can submit them off in a tween.
  7. fitness23

    Make sprite tween along an arc

    Thanks but the ease function won't have anything to do with the tween path.
  8. fitness23

    Make sprite tween along an arc

    So I know how to draw an arc = https://phaser.io/examples/v2/display/arc But how can I get a sprite to tween along it? I could make an array of x and y points for the tween, but is there a way I can get all the x and y coordinates of the arc? Hopefully the graphic below will illustrate as to what I'm after:
  9. fitness23

    onComplete not triggering

    So I'm trying to create a tween within my sprite called "walkingTween". enemy.walkingTween = this.game.add.tween(enemy).to({ x: this.player.x, y: this.player.y }, walkSpeedTime, Phaser.Easing.none).start(); And this successfully makes the tween happen. However when I try to make it do something after the tween, onComplete doesn't trigger off. enemy.walkingTween.onComplete.addOnce(function () { console.log("Tween Complete!"); }, this); Any ideas? If I did a normal tween such as: var enemyWalk = this.game.add.tween(enemy).to({ x: this.player.x, y: this.player.y }, walkSpeedTime, Phaser.Easing.none).start(); Then the onComplete function DOES work. But for various reasons I have to have this tween assigned under the sprite itself.
  10. fitness23

    States

    Cool thanks for the reply. The grouping and visibility would be a lot easier! But how would I pause the game behind it whilst the user is fiddling with the Volume level?
  11. fitness23

    States

    So I have my main game state called "Game" and I need to allow the user to go to another state called "Volume". I can make the user go to the "Volume" state all fine, but when I try going back to "Game" state by doing: this.state.start('Game'); all the functions I put in the Create function get re-run and the player has to start from the beginning again. I need the game to remember where the player was standing, where the enemies were etc, without the state restarting. Any ideas?
  12. fitness23

    Gamepad setup

    Sorry I think I've solved it now. Windows 10 doesn't seem to work with an Xbox 360 controller, but it does seem to work with an Xbox One.
  13. fitness23

    Gamepad setup

    I'm a bit confused as to how the Phaser gamepad example works. I have my XBOX 360 controller connected to my Windows 10 laptop. I then visit the example page = https://phaser.io/examples/v2/input/gamepad But it seems as though the page doesn't recognise that a controller has been connected. Am I missing anything?
  14. fitness23

    Tween world bounds

    This worked perfectly! Thanks so much I would never have got that.
  15. fitness23

    Tween world bounds

    I've been looking everywhere but is there a way to tween animate world bounds? IE tween the width: From: this.game.world.setBounds(0, 0, 1400, 500); To: this.game.world.setBounds(0, 0, 2000, 500);