Adding in missing tests and fixing as we go

This commit is contained in:
Richard Davey
2013-05-31 19:28:16 +01:00
parent d510b785b1
commit 31c4d8cb14
30 changed files with 529 additions and 118 deletions
+7 -1
View File
@@ -143,7 +143,7 @@ module Phaser.Components {
* @param clearAnimations {boolean} If this Sprite has a set of animation data already loaded you can choose to keep or clear it with this boolean
* @return {Sprite} Sprite instance itself.
*/
public loadImage(key: string, clearAnimations: bool = true) {
public loadImage(key: string, clearAnimations?: bool = true, updateBody?: bool = true) {
if (clearAnimations && this._sprite.animations.frameData !== null)
{
@@ -163,6 +163,12 @@ module Phaser.Components {
this._sprite.frameBounds.width = this.width;
this._sprite.frameBounds.height = this.height;
}
if (updateBody)
{
this._sprite.body.bounds.width = this.width;
this._sprite.body.bounds.height = this.height;
}
}
}