Ejemplo n.º 1
0
 //Currently re sending alot of data. Should be opted lated
 public void initPlayerTimer(float startTime, Game.PlayerColor initColor, TurnBasedCommProtocol protocol)
 {
     foreach (ConnectedClient c in clients)
     {
         foreach (ConnectedPlayer p in players)
         {
             PlayerTimerMsg msg2 = new PlayerTimerMsg()
             {
                 maxTime = startTime, color = p.color, startTimer = false
             };
             protocol.sendPlayerTimerInit(c.peerID, msg2);
         }
     }
 }
Ejemplo n.º 2
0
        public void broadcastStartTimer(Game.PlayerColor playerColor, float startTime, TurnBasedCommProtocol protocol)
        {
            PlayerTimerMsg msg = new PlayerTimerMsg()
            {
                maxTime = startTime, color = playerColor, startTimer = true
            };

            foreach (ConnectedClient c in clients)
            {
                protocol.sendPlayerTimerCommand(c.peerID, msg);
            }
        }