Jump to content

Search the Community

Showing results for tags 'readyCheck'.

  • 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. I'm having a bit of an issue porting a project from typescript to plain old javascript. Looking in my old game.js file (generated by the TS complier) and I grabbed the following pieces of code and placed them into files stated below. However when I try to run my page, I get the following error: Uncaught TypeError: Cannot read property 'call' of undefined phaser.js:45167 Looking into it, it appears that my Game object is being added to Phaser's readyCheck without a boot callback, but I don't understand why. I literally copied this code out of my working game file and pasted it into a new file and now it doesn't want to work. I can verify that __extends is defined correctly at runtime, Game has indeed extended the Phaser.Game prototype, and Game.prototype.boot is assigned the appropriate function, after __extends returns. I'm kinda confused and am totally prepared for this to be something dumb, but I could use some assistance here. Thank you utilities.js var __extends = this.__extends || function (d, { for (var p in if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __();};app.js var MyGame;(function (MyGame) { var Game = (function (_super) { __extends(Game, _super); function Game() { _super.call(this, 1024, 768, Phaser.AUTO, 'content', null); //this.state.add('Boot', MyGame.Boot, false); //this.state.add('Preloader', MyGame.Preloader, false); //this.state.add('Play', MyGame.Play, false); //this.state.start('Boot'); } return Game; })(Phaser.Game); MyGame.Game = Game;})(MyGame|| (MyGame = {}));// Start the gamewindow.onload = function () { var game = MyGame.Game(); };index.html <div id="content"></div><script src="/Scripts/Phaser/phaser.js"></script><script src="/Scripts/Game/utilities.js"></script><script src="/Scripts/Game/app.js"></script>
×
×
  • Create New...