Skip to content
Browse files

changed some field names in TransitionMonitor to make it more clear t…

…o understand
  • Loading branch information...
1 parent 067cbee commit 0a8cdff732596761add22c9d3e7affc88bfc1dd6 @acoppes acoppes committed Jun 7, 2012
View
28 ...ion4j-core/src/main/java/com/gemserk/animation4j/transitions/event/TransitionMonitor.java
@@ -7,28 +7,26 @@
private Transition transition;
- private boolean wasStarted = false;
+ private boolean previousStarted = false;
+ private boolean previousFinished = false;
- private boolean wasFinished = false;
-
- private boolean callOnStart;
-
- private boolean callOnFinish;
+ private boolean wasStarted;
+ private boolean wasFinished;
public void monitor(Transition transition) {
this.transition = transition;
- this.wasStarted = false;
+ this.previousStarted = false;
+ this.previousFinished = false;
this.wasFinished = false;
- this.callOnFinish = false;
- this.callOnStart = false;
+ this.wasStarted = false;
}
public boolean wasStarted() {
- return callOnStart;
+ return wasStarted;
}
public boolean wasFinished() {
- return callOnFinish;
+ return wasFinished;
}
/**
@@ -42,11 +40,11 @@ public void update() {
boolean started = transition.isStarted();
boolean finished = transition.isFinished();
- callOnStart = !wasStarted && started;
- callOnFinish = !wasFinished && finished;
+ wasStarted = !previousStarted && started;
+ wasFinished = !previousFinished && finished;
- wasStarted = started;
- wasFinished = finished;
+ previousStarted = started;
+ previousFinished = finished;
}
}
View
1 ...e/src/main/java/com/gemserk/animation4j/transitions/event/TransitionMonitorProcessor.java
@@ -33,6 +33,7 @@ public boolean isFinished() {
return finished;
}
+ @SuppressWarnings("rawtypes")
public void process(Transition transition, TransitionEventHandler transitionEventHandler) {
finished = false;
this.transitionMonitor.monitor(transition);

0 comments on commit 0a8cdff

Please sign in to comment.
Something went wrong with that request. Please try again.