Skip to content

Commit

Permalink
Update multiple method names for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
iamoscarliang committed Nov 23, 2023
1 parent 2e1c58a commit 44608c6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,29 +80,30 @@ public void onUpdate(long elapsedMillis) {
event.resetTimerEvent();
}
} else {
stopTimer();
stop();
}
}
}

@Override
public void reset() {
super.reset();
stopTimer();
mIsLooping = false;
stop();
clearTimerEvent();
}
//========================================================

//--------------------------------------------------------
// Methods
//--------------------------------------------------------
public void startTimer() {
public void start() {
mIsTimerRunning = true;
resetTimer();
resetTimerEvent();
addToGame();
}

public void stopTimer() {
public void stop() {
// Check has timer been started yet
if (isRunning()) {
removeFromGame();
Expand All @@ -113,15 +114,27 @@ public void stopTimer() {
mTotalTime = 0;
}

public void pauseTimer() {
public void pause() {
mIsTimerRunning = false;
}

public void resumeTimer() {
public void resume() {
mIsTimerRunning = true;
}

public void resetTimer() {
public void addTimerEvent(TimerEvent event) {
mEvents.add(event);
}

public void removeTimerEvent(TimerEvent event) {
mEvents.remove(event);
}

public void clearTimerEvent() {
mEvents.clear();
}

public void resetTimerEvent() {
mEventCount = mEvents.size();
mTotalEventTime = 0;
mTotalTime = 0;
Expand All @@ -134,18 +147,6 @@ public void resetTimer() {
}
}
}

public void addTimerEvent(TimerEvent event) {
mEvents.add(event);
}

public void removeTimerEvent(TimerEvent event) {
mEvents.remove(event);
}

public void clearTimerEvent() {
mEvents.clear();
}
//========================================================

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ public void setEventTime(long eventTime) {
public boolean isTimerEventDispatch() {
return mIsEventDispatch;
}

public void setTimerEventDispatch(boolean eventDispatch) {
mIsEventDispatch = eventDispatch;
}
//========================================================

//--------------------------------------------------------
Expand Down

0 comments on commit 44608c6

Please sign in to comment.