Example #1
0
        protected override void CreateScene()
        {
            this.Load(WaveContent.Scenes.GameScene);

            this.matchmakingClientService = WaveServices.GetService <MatchmakingClientService>();
            this.matchmakingClientService.StateChanged += this.MatchmakingClientService_StateChanged;
        }
Example #2
0
        protected override void CreateScene()
        {
            this.Load(WaveContent.Scenes.MyScene);

            this.matchmakingClientService = WaveServices.GetService <MatchmakingClientService>();

            this.CreateUi();
        }
        /// <inheritdoc />
        protected override NetworkPropertiesTable GetCustomProperties(MatchmakingClientService matchmakingClientService)
        {
            INetworkPlayer newPlayer;

            if (this.playerId == -1)
            {
                newPlayer = matchmakingClientService.LocalPlayer;
            }
            else
            {
                newPlayer = matchmakingClientService.CurrentRoom?.AllPlayers?.FirstOrDefault(player => player.Id == this.playerId);
            }

            var previousPlayer = this.Player;

            if (previousPlayer != newPlayer)
            {
                this.Player = newPlayer;
                this.PlayerRefreshed?.Invoke(this, previousPlayer);
            }

            return(this.Player.CustomProperties);
        }
 /// <summary>
 /// Gets the <see cref="NetworkPropertiesTable"/> instance
 /// </summary>
 /// <param name="matchmakingClientService">The <see cref="MatchmakingClientService"/> reference</param>
 /// <returns>The <see cref="NetworkPropertiesTable"/> instance</returns>
 protected abstract NetworkPropertiesTable GetCustomProperties(MatchmakingClientService matchmakingClientService);
Example #5
0
 /// <inheritdoc />
 protected override NetworkPropertiesTable GetCustomProperties(MatchmakingClientService matchmakingClientService)
 {
     return(matchmakingClientService.CurrentRoom?.CustomProperties);
 }