Skip to content

Commit

Permalink
Метод goto() переименован в switchFrame() (closes #27)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntKarlov committed May 6, 2014
1 parent 3cf60d8 commit 09be437
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ru/antkarlov/anthill/AntButton.as
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ package ru.antkarlov.anthill
status = NORMAL;
}

goto(status);
switchFrame(status);
updateLabel();
}

Expand Down Expand Up @@ -817,7 +817,7 @@ package ru.antkarlov.anthill
*
* @param aFrame Кадр на который необходимо перевести состояние кнопки.
*/
protected function goto(aFrame:int):void
protected function switchFrame(aFrame:int):void
{
if (_curAnim == null)
{
Expand Down
10 changes: 5 additions & 5 deletions ru/antkarlov/anthill/AntMask.as
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ package ru.antkarlov.anthill
public function gotoAndStop(aFrame:Number):void
{
currentFrame = (aFrame <= 0) ? 1 : (aFrame > totalFrames) ? totalFrames : aFrame;
goto(currentFrame);
switchFrame(currentFrame);
stop();
}

Expand All @@ -315,7 +315,7 @@ package ru.antkarlov.anthill
public function gotoAndPlay(aFrame:Number):void
{
currentFrame = (aFrame <= 0) ? 1 : (aFrame > totalFrames) ? totalFrames : aFrame;
goto(currentFrame);
switchFrame(currentFrame);
play();
}

Expand All @@ -335,7 +335,7 @@ package ru.antkarlov.anthill
public function nextFrame(aUseSpeed:Boolean = false):void
{
aUseSpeed ? currentFrame += animationSpeed * AntG.timeScale : currentFrame++;
goto(currentFrame);
switchFrame(currentFrame);
}

/**
Expand All @@ -346,7 +346,7 @@ package ru.antkarlov.anthill
public function prevFrame(aUseSpeed:Boolean = false):void
{
aUseSpeed ? currentFrame -= animationSpeed * AntG.timeScale : currentFrame--;
goto(currentFrame);
switchFrame(currentFrame);
}

/**
Expand Down Expand Up @@ -462,7 +462,7 @@ package ru.antkarlov.anthill
*
* @param aFrame Кадр на который необходимо перевести текущую анимацию.
*/
protected function goto(aFrame:Number):void
protected function switchFrame(aFrame:Number):void
{
var i:int = AntMath.floor(aFrame - 1);
i = (i <= 0) ? 0 : (i >= totalFrames - 1) ? totalFrames - 1 : i;
Expand Down

0 comments on commit 09be437

Please sign in to comment.