Jump to content

modify my game to work on 1.2


dan
 Share

Recommended Posts

I am new to phaser and would like to jump on 1.2.

I switched git to the 1.2 branch and use the build of 1.2 on my little hello world sample game.

 

I get the following errors:

Uncaught TypeError: Cannot read property 'gravity' of null

this.bird.body.gravity.y = 400;

 

Uncaught TypeError: Object #<Object> has no method 'overlap'

this.game.physics.overlap(this.bird, this.pipes, this.hit_pipe, null, this);

 

I know that it's due to major changes in the codebase.

since the examples are also broken on this branch it's a bit hard to figure out what should I change.

 

grepping the codebase was not very helpful but I am sure i'll get better at understanding the codebase as i spend more time with this project. if there is a good post that can help understand the codebase better, please link it away!

 

Thanks in advance!

Link to comment
Share on other sites

A body doesn't have a gravity value any more and there's no physics overlaps/collides functions anymore either.

 

We're currently converting all of the old examples over to 1.2 and will do all the physics ones next week, so it might be worth waiting for those - otherwise feel free to dig through the docs for Body and World and any of the code in the examples/wip folder.

Link to comment
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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...