Esempio n. 1
0
 public void SendMessageToPlayers(BloodAndBileEngine.Networking.NetworkMessage message, int channelID = -1)
 {
     foreach (int coID in PlayerConnectionIDs)
     {
         BloodAndBileEngine.Networking.MessageSender.Send(message, coID, channelID);
     }
 }
Esempio n. 2
0
    public void Start()
    {
        BloodAndBileEngine.Networking.NetworkSocket.RegisterOnDisconnectionCallback(OnPlayerDisconnected);


        // Envoi d'un message de commencement du match.
        BloodAndBileEngine.Networking.NetworkMessage message = new BloodAndBileEngine.Networking.NetworkMessage(20001);
        SendMessageToPlayers(message, 0);

        // Initialisation des modules
        foreach (MatchModule modules in Modules)
        {
            modules.Initialise(); // Initialisation des modules.
        }
        Ongoing = true;           // On lance le match.
    }
Esempio n. 3
0
 void OnMatchStarted(BloodAndBileEngine.Networking.NetworkMessageInfo info, BloodAndBileEngine.Networking.NetworkMessage message)
 {
     // Switch vers le OnlinePlayingState.
     Client.ChangeState(new OnlinePlayingState(MatchServerConnectionID));
 }