• brainCloud C# library updated (5.1.1)

    Unsolved General
    1
    1 Votes
    1 Posts
    12 Views
    No one has replied
  • 0 Votes
    3 Posts
    70 Views

    Thank you for bringing this to our attention. We will proceed to include this API in the list.

  • Lobby creation/deletion events in CloudCode

    Unsolved Cloud Code
    13
    0 Votes
    13 Posts
    208 Views

    Hi Alessio,

    I have a suggestion.

    Why not create a global chat channel called "lobbyListeners".

    Then - when a user is viewing the lobbies - have them connect to and listen to the lobbyListeners channel.

    Then you don't need to maintain a global entity at all. Whenever you create a lobby or delete it - send an event to lobbyListeners - and it will automatically send it to everyone who has registered for the channel.

    Would that work? (or is there a part of your use case that I am missing?)

    Paul.

  • 0 Votes
    2 Posts
    80 Views

    Hello Andrey and thank you for your inquiry,

    For an approach like this I would recommend grabbing the matchState as a Dictionary<string,object> and then making a new instance of JsonMatchState and filling in each field one at a time.

    An example of this would look like to get one of the fields:

    JsonMatchState matchState = new JsonMatchState(); var matchState = data["matchState"] as Dictionary<string, object>; matchState.turnNumber = (int) matchState["turnNumber"];

    Hope this helps and please let us know if you have further questions or inquiries about this.

  • 0 Votes
    1 Posts
    79 Views
    No one has replied