Added Event Markers to Replay, which allow players to quickly mark important events while recording (M key by default)

Added Event Marker Indicators to be displayed on GuiTimeline
This commit is contained in:
CrushedPixel
2015-06-09 16:08:06 +02:00
parent ea968ca418
commit d30ef19c89
13 changed files with 235 additions and 20 deletions

View File

@@ -0,0 +1,45 @@
package eu.crushedpixel.replaymod.holders;
import org.apache.commons.lang3.builder.HashCodeBuilder;
public class Marker {
public Marker(Position position, int timestamp, String name) {
this.position = position;
this.timestamp = timestamp;
this.name = name;
}
private Position position;
private int timestamp;
private String name;
public Position getPosition() {
return position;
}
public int getTimestamp() {
return timestamp;
}
public String getName() {
return name;
}
@Override
public boolean equals(Object o2) {
if(o2 == null) return false;
if(!(o2 instanceof Marker)) return false;
Marker m2 = (Marker)o2;
return hashCode() == m2.hashCode();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37)
.append(position)
.append(timestamp)
.append(name)
.toHashCode();
}
}