Stop Network Call for Sometime

Options
I am working on roulette game since last month.
Now I want to stop network call for some time.

In following sentences, I try to explain my situation.
I am working on 4 players game that remain active at a time. For example one player exist and current stage it is spinning wheel and at same time other player comes and join the room. I want that second connected player has to wait for spinning completion before joining game.

At present, second player is connected and reached at wheel table. So how to stop that network process.
I want to add some time of wait in player interaction with network.
private void UpdateWheelSpinningProperty(bool flag)
    {
        ExitGames.Client.Photon.Hashtable wheelSpinningHashTable = new ExitGames.Client.Photon.Hashtable();
        wheelSpinningHashTable.Add(Constants.PROP_WHEEL_SPINNING, flag);
        PhotonNetwork.room.SetCustomProperties(wheelSpinningHashTable);
    }

I have set this type of room property to detect the current state of room.
That become helpful to current connected player. I want some suggestions from your side to handle this situation.

Comments

  • Tobias
    Options
    We already have the current state in the properties, so new players will have to check those props on join.
    When you join, make sure the client doesn't do anything but wait for the next round.

    You can't stop network connection in that time, as you want to know when a new player can actually do something.
  • Sorry for my too many questions. I just want to get knowledge and I am getting that one because of your help.
    Tobias wrote:
    We already have the current state in the properties, so new players will have to check those props on join.
    Which type of state properties you are talking about?
    Tobias wrote:
    When you join, make sure the client doesn't do anything but wait for the next round.
    For this, Has Photon any ready made functionality or this thing I have to implement manually??
  • Tobias
    Options
    I am talking about PhotonNetwork.room.SetCustomProperties(wheelSpinningHashTable);
    This sets the state and anyone who joins a game gets these values and has to setup the local state accordingly.

    You have to implement your game state yourself (manually).
    There is a callback when the client joined a game but our networking code does not know when your game-state is ready to do anything.
    Callbacks are listed and described in enum PhotonNetworkingMessage.