Permalink
Browse files

Removed the registrationPoint override from the sprite renderer

  • Loading branch information...
1 parent e200759 commit f6ff1087d953fc599dc638e30ee0170e1b04f413 @hybridmindset committed Oct 28, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/com/pblabs/rendering2D/SWFSpriteRenderer.as
  2. +4 −4 src/com/pblabs/rendering2D/SpriteRenderer.as
@@ -89,7 +89,7 @@ package com.pblabs.rendering2D
_classInstance = instance;
MCUtil.stopMovieClips( _classInstance as MovieClip);
// set the registration (alignment) point to the sprite's center
- if(!_registrationPoint || _registrationPoint.x == 0 && _registrationPoint.y == 0){
+ if(!_registrationPoint){
_registrationPoint = MCUtil.getRegistrationPoint( _classInstance );
if(_registrationPoint.x < 0) _registrationPoint.x *= -1;
if(_registrationPoint.y < 0) _registrationPoint.y *= -1;
@@ -113,17 +113,17 @@ package com.pblabs.rendering2D
_failed = false;
_resource = res;
// set the registration (alignment) point to the sprite's center
- if(registrationPoint.x == 0 && registrationPoint.y == 0)
- registrationPoint = new Point(res.image.bitmapData.width/2,res.image.bitmapData.height/2);
+ //if(registrationPoint.x == 0 && registrationPoint.y == 0)
+ //registrationPoint = new Point(res.image.bitmapData.width/2,res.image.bitmapData.height/2);
// set the bitmapData of this render object
bitmapData = res.image.bitmapData;
}
protected override function dataModified():void
{
// set the registration (alignment) point to the sprite's center
- if(registrationPoint.x == 0 && registrationPoint.y == 0)
- registrationPoint = new Point(bitmapData.width/2,bitmapData.height/2);
+ //if(registrationPoint.x == 0 && registrationPoint.y == 0)
+ //registrationPoint = new Point(bitmapData.width/2,bitmapData.height/2);
}
/**

0 comments on commit f6ff108

Please sign in to comment.