Jump to content

Search the Community

Showing results for tags 'tween sprite oncomplete scale'.

  • 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. eat_candy: function(player, candy){ if(candy.flag){ candy.flag = false; console.log("candy eaten"); this.score += candy.scale.x*10; this.label_score.content = this.score; this.add.tween(candy.scale) .to({ x: 0, y: 0}, 2000, Phaser.Easing.Linear.None) .start() .onComplete.add(this.kill_candy, this); }},kill_candy: function(candy){ console.log(candy); candy.kill(); console.log("killed");},Hello, It's my first post in this forum, I usually read the answer to resolve my problems but this time I didn't find anything about my problem. When using tween(candy.scale) to tween the scale of my sprite, I'm not able to get my candy object on the function kill_candy() called by onComplete.add() My console.log(candy) return me a Phaser.point object and not a Phaser.sprite and I cannot call kill() on it Is it possible to get the candy object in the kill_candy() function ? Thank you
×
×
  • Create New...