Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: The null object does not have a getter 'x'. #5

Closed
darkoverlordofdata opened this issue Sep 1, 2014 · 2 comments
Closed
Labels

Comments

@darkoverlordofdata
Copy link
Contributor

This error is coming from Sprite.update crop.:

//this._crop = Rectangle.clone(this.cropRect, this._crop);
this._crop.x += this._frame.x;

this._crop is null. If you un-rem the lines, there is no Rectangle.cone method.
It looks like Phaser.Rectangle.clone = function (a, output) {
isn't getting ported.

@playif
Copy link
Owner

playif commented Sep 1, 2014

Hi @darkoverlordofdata

I do not implement the static method Rectangle.clone due to name conflict problem.
Therefore, there is only a instance method of "clone".
The problem is that I forgot to set the return value to crop.

I fixed the bug as follows:

    this._crop = this.cropRect.clone();

please update the package to 0.10.2, and let me know if the bug is still there, thanks.

@playif playif added the bug label Sep 1, 2014
@playif playif closed this as completed Sep 1, 2014
@darkoverlordofdata
Copy link
Contributor Author

It all works now. I was able to finish my port my demo game from
coffeecscript to dart:
http://darkoverlordofdata.com/alienzed/
https://github.com/darkoverlordofdata/alienzed

Now I just have to finish the game :)

Thanks!

On Sun, Aug 31, 2014 at 11:24 PM, playif [email protected] wrote:

Closed #5 #5.


Reply to this email directly or view it on GitHub
#5 (comment).

Bruce Davidson
Schedule a meeting: https://meetin.gs/meet/bruce-davidson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants