Jump to content

Search the Community

Showing results for tags 'pixi ticker'.

  • 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
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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 1 result

  1. Hi all, I am developing a simple 2D game with PIXI js and have created an FSM that controls game flow at a high level. During some of the transitions between game states it would be desirable to have some animations in the game halt while others continue on or change. I have read the docs for PIXI.ticker.Ticker and my proposed solution was to use the remove function as outlined below. This is the most basic example I can give. class SomeState extends State { constructor(game){ //does some stuff with the passed in game } enter(){ //attach some animation loops to the app ticker this.game.app.ticker.add(this.game.someAwesomeFunction.bind(this.game)); } //...a bunch of things to do with updating a state etc exit(){ //Here I would like to essentially pause a subset of the animation loops attached in the enter //function like so: this.game.app.ticker.remove(this.game.someAwesomeFunction); //This doesn't behave as expected sadly, the function is not removed from the ticker and just //continues on like nothing happened } } I have observed the function signature being passed to `remove` and it matches the signature being passed to `add`. Has anyone got any ideas as to why I am unable to remove a listener instance from the game ticker? Or in fact have an opinion on this approach in general, may I am barking up the wrong tree. Thank you in advance!
×
×
  • Create New...