Created
August 12, 2018 19:00
-
-
Save dacharya64/4825499dfe9b6c802f61b2e81d5138fe to your computer and use it in GitHub Desktop.
[GSoC Light and Shadow] Incrementing Score and Sending Event on Authority System
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void incrementScore(LASTeamComponent baseTeamComponent) { | |
if (baseTeamComponent.team.equals(LASUtils.RED_TEAM)) { | |
redScore++; | |
// Send event to clients to update their Score UI | |
sendEventToClients(new ScoreUpdateFromServerEvent(LASUtils.RED_TEAM, redScore)); | |
return; | |
} | |
if (baseTeamComponent.team.equals(LASUtils.BLACK_TEAM)) { | |
blackScore++; | |
// Send event to clients to update their Score UI | |
sendEventToClients(new ScoreUpdateFromServerEvent(LASUtils.BLACK_TEAM, blackScore)); | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment