Search the Community

Showing results for tags 'tweenmanager'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3 results

  1. I'm making a game where a function creates a group of "fish" with tweening, and the tween calls another function on completion to create a new tween with new parameters, and so on. When the player's character collides with the fish, I want them to reset, and swim using a new tween. All the code works except that the tween that was in action prior to collision isn't destroyed by .reset function, and most likely is the reason why the fish are jumping around the screen. Here it is: http://chetansharma.info/work/thefishking/v02/ How do I address or stop a tween when I can reference the object it was applied to? I tried creating a tween manager and added all tweens to it (inside a state's declaration) but keep getting errors (in game.js state file) An example on how to solve this would be nice.
  2. I'm making a game where a function creates a group of "fish" with tweening, and the tween calls another function on completion to create a new tween with new parameters. When the player's character collides with the fish, I want them to reset, and swim using a new tween. All the code works except that the tween that was in action prior to collision isn't destroyed by reset function, and makes the fish jump around the screen. How do I address or stop a tween when I can reference the object it was applied to? I tried creating a tween manager and added all tweens to it (inside a state's declaration) but keep getting errors.
  3. I got a tiny problem with chained tweens, i hope anybody can help me: var tween = game.add.tween(mySprite).to({someoptions}, 1000, Phaser.Easing.Linear.None) .to({someoptions}, 1000, Phaser.Easing.Linear.None) .to({someoptions}, 1000, Phaser.Easing.Linear.None) .start();Now what i want to do is to completely stop the whole chain while it runs, and restart it from the beginning. I did this with the following code: game.tweens.removeAll();(game is the Phaser instance, of course) The tween gets stopped indeed and the sprite does not move anymore - but when i create a new tween chain right after "removeAll" it does not start immediately. Instead, the sprite stands still for a while (as if the other tween chain would still run in the background but with no visible effect) and the new tween chain runs smoothly after that time. I hope my explanation was understandable