mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 05:58:30 +00:00
ArcadePhysics.World.separateCircle is a new method that handles all circular body collisions internally within Arcade Physics (thanks @VitaZheltyakov) All of the Arcade Physics internal methods, such as `collideGroupVsSelf`, `collideSpriteVsSprite` and so on, have been updated to work with circular body shapes (thanks @VitaZheltyakov) ArcadePhysics.Body.onWorldBounds is a new Signal that is dispatched whenever the Body collides with the world bounds, something that was previously difficult to detect. Due to the potentially high volume of signals this could create it is disabled by default. To use this feature set this property to a Phaser.Signal: `sprite.body.onWorldBounds = new Phaser.Signal()` and it will be called when a collision happens, passing one argument: the sprite on which it occurred. |
||
---|---|---|
.. | ||
box2d.d.ts | ||
p2.d.ts | ||
phaser.comments.d.ts | ||
phaser.d.ts | ||
phaser_box2d.d.ts | ||
pixi.comments.d.ts | ||
pixi.d.ts | ||
readme.md | ||
tslint.json | ||
typings.json |
TypeScript Definitions
Reference the phaser.d.ts
in your project.
Please use TypeScript 1.4+
phaser.d.ts
contains a reference topixi.d.ts
andp2.d.ts
and so both these files must remain siblings in the same directory.pixi.d.ts
has deviated from the official project. If you are a pixi user, pick up the ball over at the official pixi typescript repo.
Including typescript definitions in your project using Typings
You can now use typings, the TypeScript Definition Manager, to include Phaser's typescript definitions in your project:
- Make sure that typings is installed in your system:
npm install -g typings
- Install phaser typescript definitions as a global dependency:
typings install github:photonstorm/phaser/typescript/typings.json -GD
This will make phaser typescript definitions available for your compiler so that there is no need to reference them from your source files. For more information, check the official typings site.
Contributing
If you find any mistakes in these definitions or you feel they can be improved in any way, please make a pull request against the dev branch.
Note
Creature
defs are not yet provided.
The Box2D defs come from https://github.com/SBCGames/Phaser-Box2D-Typescript-defs