Last change
on this file since a49176d was 8edd04e, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 4 years ago |
Make the decompiled game code compile successfully
|
-
Property mode
set to
100644
|
File size:
454 bytes
|
Rev | Line | |
---|
[8edd04e] | 1 | package main;
|
---|
| 2 |
|
---|
| 3 | public class EffectTimer {
|
---|
| 4 |
|
---|
| 5 | private Effect effect;
|
---|
| 6 | private long duration;
|
---|
| 7 | private long startTime;
|
---|
| 8 |
|
---|
| 9 | public EffectTimer(Effect effect, long duration) {
|
---|
| 10 | this.effect = effect;
|
---|
| 11 | this.duration = duration;
|
---|
| 12 | this.startTime = System.currentTimeMillis();
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | public Effect getEffect() {
|
---|
| 16 | return this.effect;
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | public boolean expired() {
|
---|
| 20 | return (System.currentTimeMillis() - this.startTime >= this.duration);
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.