Sign in to follow this  
Rudrabhoj Bhati

Phaser.Game buggy emit

Recommended Posts

I created a class named ControlData whose instance is passed to various objects so they can access many datas needed by all classes including main Phaser.Game instance.

package data;import phaser.Phaser;import phaser.core.Game;class ControlData {  public var game:Game;  public var score:Int;  public var high_score:Int;  public function new(){ = new Game(1136, 640, Phaser.AUTO, 'play_area');    this.score = 0;    this.high_score = 0;  }}

But the class don't get emitted properly in JS, I get the following output:

var data_ControlData = function() { = new Phaser.Game(null,null,1136,640,Phaser.AUTO,null,null,"play_area");	this.score = 0;	this.high_score = 0;};

See the extra nulls everywhere! Not a huge issue, I created a small C++ program to auto correct it, whom my build script calls, so it is still just one command compilation at my part "./", but using just "haxe Compile.hxml" would be much simpler.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.