Github Bug Fixes

This commit is contained in:
Richard Davey
2013-04-28 21:40:06 +01:00
parent a3b27fbf32
commit 21120c8b62
13 changed files with 99 additions and 31 deletions
+4 -2
View File
@@ -80,7 +80,6 @@ module Phaser {
public onRenderCallback = null;
public onPausedCallback = null;
public camera: Camera; // quick reference to the default created camera, access the rest via .world
public cache: Cache;
public collision: Collision;
public input: Input;
@@ -330,7 +329,6 @@ module Phaser {
this.onUpdateCallback = null;
this.onRenderCallback = null;
this.onPausedCallback = null;
this.camera = null;
this.cache = null;
this.input = null;
this.loader = null;
@@ -422,6 +420,10 @@ module Phaser {
return this.collision.overlap(objectOrGroup1, objectOrGroup2, notifyCallback, Collision.separate);
}
public get camera(): Camera {
return this.world.cameras.current;
}
}
}
+9 -9
View File
@@ -16,9 +16,9 @@ module Phaser {
this._game = game;
this._cameras = new CameraManager(this._game, 0, 0, width, height);
this.cameras = new CameraManager(this._game, 0, 0, width, height);
this._game.camera = this._cameras.current;
this._game.camera = this.cameras.current;
this.group = new Group(this._game, 0);
@@ -29,8 +29,8 @@ module Phaser {
}
private _game: Game;
private _cameras: CameraManager;
public cameras: CameraManager;
public group: Group;
public bounds: Rectangle;
public worldDivisions: number;
@@ -41,14 +41,14 @@ module Phaser {
this.group.update();
this.group.postUpdate();
this._cameras.update();
this.cameras.update();
}
public render() {
// Unlike in flixel our render process is camera driven, not group driven
this._cameras.render();
this.cameras.render();
}
@@ -56,7 +56,7 @@ module Phaser {
this.group.destroy();
this._cameras.destroy();
this.cameras.destroy();
}
@@ -109,15 +109,15 @@ module Phaser {
// Cameras
public createCamera(x: number, y: number, width: number, height: number): Camera {
return this._cameras.addCamera(x, y, width, height);
return this.cameras.addCamera(x, y, width, height);
}
public removeCamera(id: number): bool {
return this._cameras.removeCamera(id);
return this.cameras.removeCamera(id);
}
public getAllCameras(): Camera[] {
return this._cameras.getAll();
return this.cameras.getAll();
}
// Game Objects
+8 -8
View File
@@ -27,13 +27,13 @@ module Phaser {
this.y = Y;
this.width = 0;
this.height = 0;
this.minParticleSpeed = new Point(-100, -100);
this.maxParticleSpeed = new Point(100, 100);
this.minParticleSpeed = new MicroPoint(-100, -100);
this.maxParticleSpeed = new MicroPoint(100, 100);
this.minRotation = -360;
this.maxRotation = 360;
this.gravity = 0;
this.particleClass = null;
this.particleDrag = new Point();
this.particleDrag = new MicroPoint();
this.frequency = 0.1;
this.lifespan = 3;
this.bounce = 0;
@@ -41,7 +41,7 @@ module Phaser {
this._counter = 0;
this._explode = true;
this.on = false;
this._point = new Point();
this._point = new MicroPoint();
}
/**
@@ -68,18 +68,18 @@ module Phaser {
* The minimum possible velocity of a particle.
* The default value is (-100,-100).
*/
public minParticleSpeed: Point;
public minParticleSpeed: MicroPoint;
/**
* The maximum possible velocity of a particle.
* The default value is (100,100).
*/
public maxParticleSpeed: Point;
public maxParticleSpeed: MicroPoint;
/**
* The X and Y drag component of particles launched from the emitter.
*/
public particleDrag: Point;
public particleDrag: MicroPoint;
/**
* The minimum possible angular velocity of a particle. The default value is -360.
@@ -149,7 +149,7 @@ module Phaser {
/**
* Internal point object, handy for reusing for memory mgmt purposes.
*/
private _point: Point;
private _point: MicroPoint;
/**
* Clean up memory.
+1 -1
View File
@@ -262,7 +262,7 @@ module Phaser {
**/
get isEmpty(): bool {
if (this._diameter < 1)
if (this._diameter <= 0)
{
return true;
}