-
Notifications
You must be signed in to change notification settings - Fork 3
/
Quake.java
49 lines (36 loc) · 1.17 KB
/
Quake.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import processing.core.PImage;
import java.util.List;
public class Quake extends ScheduleAnimation implements AnimatedActor{
protected int imageIndex = 0;
protected Point position;
protected int animationPeriod;
protected String id;
protected int actionPeriod;
protected List<PImage> images;
public Quake(String id, Point position, List<PImage> images, int actionPeriod, int animationPeriod) {
super(id,position,images,actionPeriod,animationPeriod);
}
public void executeActivity(WorldModel world, ImageStore imageStore, EventScheduler scheduler)
{
scheduler.unscheduleAllEvents(this);
world.removeEntity(this);
}
@Override
public Point getPosition() {
return null;
}
@Override
public void setPosition(Point newPos) {
}
public List<PImage> getImages(){return images;}
@Override
public PImage getCurrentImage() {
return null;
}
public int getActionPeriod(){return actionPeriod;}
public int getAnimationPeriod(){ return this.animationPeriod; }
public void nextImage()
{
this.imageIndex = (this.imageIndex + 1) % this.images.size();
}
}