Exemplo n.º 1
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);
            }
        }
Exemplo n.º 2
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);
         }
     }
 }
Exemplo n.º 3
0
 public void sendPlayerTimerCommand(int targetID, PlayerTimerMsg ptm)
 {
     sendMsg(ptm, targetID, (short)ServerCommProtocl.PlayerTimerCommand);
 }