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

 Share

  • Recently Browsing   0 members

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