Jump to content

Enabling Game Physics passing specific system


LogicaLinsanity
 Share

Recommended Posts

Hello,

I was following the Advanced Typescript tutorial here: http://www.photonstorm.com/phaser/advanced-phaser-and-typescript-projects

I came to the point where we added player movement and had a compilation error and found in the phaser documentation (http://phaser.io/docs/2.4.4/Phaser.Sprite.html#body) that I needed to use "game.physics.enable(object, system);" in the Player.ts file to start the physics engine. When I tried to pass Phaser.Physics.Arcade I realized the system parameter is of type :number, however, and I couldn't pass the object. I ended up just using "game.physics.enable(this);" to default it to arcade. But just feels like I'm missing something there.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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