Added sounds to coin pick up

Refactored check for token collision to move into the generic check for collision method
Created a YachtEventType enum to differentiate between collision and pickup on client side.
Client now plays a sound when they pick up a token

#story[1250]
This commit is contained in:
William Muir
2017-09-11 14:45:04 +12:00
parent 02e6d2a98b
commit 9fcb8915c2
5 changed files with 118 additions and 52 deletions
@@ -18,13 +18,13 @@ public class YachtEventCodeMessage extends Message {
private int eventId;
public YachtEventCodeMessage(Integer subjectId) {
public YachtEventCodeMessage(Integer subjectId, YachtEventType yachtEventType) {
timeStamp = System.currentTimeMillis() / 1000L;
ack = 0;
raceId = 1;
destSourceId = subjectId; // collision boat source id
incidentId = 0;
eventId = 33;
eventId = yachtEventType.getCode();
setHeader(new Header(MESSAGE_TYPE, 0x01, (short) getSize()));
allocateBuffer();