Packets are sent out when collision happens and receiver is able to interpret and display as visual alert. Updated visual alert to looks better.

- Created yacht event code message to be sent out as packet.
- Added observers to main server thread on yacht so when collision detected, main server thread will send out yacht event message to all server to client threads.
- Updated collision visual alert using circle and animation timer.

#story[1117]
This commit is contained in:
Zhi You Tan
2017-08-10 19:50:30 +12:00
parent 07386ed2db
commit 7e1686a980
6 changed files with 119 additions and 25 deletions
@@ -342,8 +342,8 @@ public class GameClient {
* Tells race view to show a collision animation.
*/
private void showCollisionAlert(YachtEventData yachtEventData) {
// 1 is used by team 28 to show collision
if (yachtEventData.getEventId() == 1) {
// 33 is the agreed code to show collision
if (yachtEventData.getEventId() == 33) {
raceView.showCollision(yachtEventData.getSubjectId());
}
}