/// <summary> /// Sends the event match updated. /// </summary> /// <param name="message">Message.</param> public void SendEvent_MatchUpdated(MatchUpdatedMessage message) { foreach (SparkBehaviour behaviour in ObservedBehaviours) { behaviour.Call("OnMatchUpdated", message); } }
public void UpdateRTSessionInfo(MatchUpdatedMessage _message) { // The MatchUpdatedMessage's participants list contains the most recent list of players in the match, so we can reset the list playerList = new List <RTPlayer> (); foreach (MatchUpdatedMessage._Participant player in _message.Participants) { playerList.Add(new RTPlayer(player.DisplayName, player.Id, (int)player.PeerId)); } }
public virtual void OnMatchInfoUpdatedInvoke(MatchUpdatedMessage x) { if (GameSparksManager.Instance().IsDebug) { var subs = OnMatchInfoUpdated?.GetInvocationList(); var debugStr = "OnMatchInfoUpdated InvokationList: "; subs?.ToList().ForEach(m => debugStr += "\n" + m.Method.Name); Debug.Log(debugStr); } OnMatchInfoUpdated?.Invoke(x); }
/// <summary> /// Raises the match updated event. /// </summary> /// <param name="message">Message.</param> private void OnMatchUpdated(MatchUpdatedMessage message) { foreach (SparkView view in sparkViews) { view.SendEvent_MatchUpdated(message); } foreach (MatchUpdatedMessage._Participant participant in message.Participants) { SparkPeer peer = new SparkPeer(participant.DisplayName, participant.Id, participant.PeerId.Value); if (message.AddedPlayers.Contains(participant.Id)) { sparkMatch.peerList.Add(peer); } if (message.RemovedPlayers.Contains(participant.Id)) { sparkMatch.peerList.Remove(peer); } } }
private void MatchUpdated(MatchUpdatedMessage message) { }
private void OnMatchUpdated(MatchUpdatedMessage message) { Debug.Log("On match updated."); playerNames = message.Participants.Select(x => x.DisplayName).ToArray(); }
private void OnMatchUpdated(MatchUpdatedMessage m) { Debug.Log(m.ToString()); }
private void MatchUpdated(MatchUpdatedMessage obj) { print("updated"); }
private void OnMatchUpdated(MatchUpdatedMessage m) { }