Camera.unfollow allows you to easily unfollow a tracked object (thanks @alvinsight, #755)

This commit is contained in:
photonstorm 2014-04-28 14:56:43 +01:00
parent 56d7dcfadb
commit 360d744472
2 changed files with 12 additions and 0 deletions

View file

@ -133,6 +133,7 @@ Version 2.0.4 - "Mos Shirare" - in development
* Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel, you can optionally set the saturation and value amounts.
* Color.HSLColorWheel will return an array with 360 color objects for each segment of an HSL color wheel, you can optionally set the saturation and lightness amounts.
* Timer.timeCap is a new setting allowing your Timers to protect against unexpectedly large delta timers (such as raf de-vis or CPU grind).
* Camera.unfollow allows you to easily unfollow a tracked object (thanks @alvinsight, #755)
### Bug Fixes

View file

@ -167,6 +167,17 @@ Phaser.Camera.prototype = {
},
/**
* Sets the Camera follow target to null, stopping it from following an object if it's doing so.
*
* @method Phaser.Camera#unfollow
*/
unfollow: function () {
this.target = null;
},
/**
* Move the camera focus on a display object instantly.
* @method Phaser.Camera#focusOn