Jump to content

Search the Community

Showing results for tags 'custom function'.

  • 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. Hello again, so I've got this state: BasicGame.Game = function (game) { //... } BasicGame.Game.prototype = { create: function () { //... this.game.onBlur.add(pauseGame, this); function pauseGame(game) { sfx_music.pause(); this.game.paused = true; }; }, update: function () { if (escKey.isDown) { this.pauseGame(); } } }; So the problem is that when calling this.pauseGame(); in the update function throws the error: Uncaught TypeError: this.pauseGame is not a function I'm aware that the I'm either not calling it right (I tried everything I could think of though) or it simpy is not available in this context at all. When I declare the function outside of the create function, I get an when trying to add it to onBlur, so it is not that easy as well. What do I do to make it available in both contexts?
×
×
  • Create New...