Cleaned up CCAction.cpp

*Fixed tab/space issue.
*Removed unneeded if/else block.
*Added explicit braces around if block.
This commit is contained in:
Justin Fraize 2015-02-12 21:00:12 -08:00
parent 87e444873f
commit 3667cc6e1f
1 changed files with 4 additions and 10 deletions

View File

@ -201,16 +201,8 @@ bool Follow::initWithTarget(Node *followedNode, const Rect& rect/* = Rect::ZERO*
followedNode->retain();
_followedNode = followedNode;
_worldRect = rect;
if (rect.equals(Rect::ZERO))
{
_boundarySet = false;
}
else
{
_boundarySet = true;
}
_worldRect = rect;
_boundarySet = !rect.equals(Rect::ZERO);
_boundaryFullyCovered = false;
Size winSize = Director::getInstance()->getWinSize();
@ -254,7 +246,9 @@ void Follow::step(float dt)
{
// whole map fits inside a single screen, no need to modify the position - unless map boundaries are increased
if(_boundaryFullyCovered)
{
return;
}
Vec2 tempPos = _halfScreenSize - _followedNode->getPosition();