Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

check when setting timer seconds and allow 0

  • Loading branch information...
commit 59134daa4ac64cb6c0a7bc5cbd014e8f0c434858 1 parent 9ae632b
@winniehell winniehell authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/org/andengine/engine/handler/timer/TimerHandler.java
View
6 src/org/andengine/engine/handler/timer/TimerHandler.java
@@ -33,7 +33,7 @@ public TimerHandler(final float pTimerSeconds, final ITimerCallback pTimerCallba
}
public TimerHandler(final float pTimerSeconds, final boolean pAutoReset, final ITimerCallback pTimerCallback) {
- if(pTimerSeconds <= 0){
+ if(pTimerSeconds < 0){
throw new IllegalStateException("pTimerSeconds must be >= 0!");
}
@@ -55,6 +55,10 @@ public void setAutoReset(final boolean pAutoReset) {
}
public void setTimerSeconds(final float pTimerSeconds) {
+ if(pTimerSeconds < 0){
+ throw new IllegalStateException("pTimerSeconds must be >= 0!");
+ }
+
this.mTimerSeconds = pTimerSeconds;
}
Please sign in to comment.
Something went wrong with that request. Please try again.