phaser/Phaser/physics/Manager.ts

49 lines
1,021 B
TypeScript
Raw Normal View History

2013-06-26 04:44:56 +00:00
/// <reference path="../Game.ts" />
/**
2013-06-26 04:44:56 +00:00
* Phaser - Physics Manager
*
2013-08-02 11:38:56 +00:00
* Eventually this will handle switching between the default ArcadePhysics manager or the new AdvancedPhysics manager.
* For now we direct everything through ArcadePhysics.
*/
2013-06-26 04:44:56 +00:00
module Phaser.Physics {
export class Manager {
constructor(game: Game) {
2013-08-02 11:38:56 +00:00
this.game = game;
2013-08-02 11:38:56 +00:00
this.arcade = new Phaser.Physics.ArcadePhysics(this.game, this.game.stage.width, this.game.stage.height);
this.gravity = this.arcade.gravity;
this.bounds = this.arcade.bounds;
}
/**
* Local reference to Game.
*/
public game: Game;
2013-08-02 11:38:56 +00:00
/**
* Instance of the ArcadePhysics manager.
*/
public arcade: Phaser.Physics.ArcadePhysics;
2013-08-02 11:38:56 +00:00
public gravity: Vec2;
public bounds: Rectangle;
2013-08-02 11:38:56 +00:00
/**
* Called by the main Game.loop
*/
public update() {
2013-08-02 11:38:56 +00:00
//this.arcade.updateMotion
}
}
}