コード例 #1
0
        public override void OnJoin(IJoinGameCallInfo info)
        {
            // no sync OnJoin support for now - since we already changed the room state when we get here.
            // to allow a clean sync (cancelable OnJoin) we need to
            // a. run all the pre-checks
            // b. call OnJoin with the expected new actornr
            // c. on continue - add peer to room

            if (!string.IsNullOrEmpty(this.gameJoinUrl))
            {
                // remove for callAsync=false
                info.Continue();

                this.PostJsonRequest(
                    this.gameJoinUrl,
                    new WebhooksRequest
                {
                    Type       = "Join",
                    GameId     = this.PluginHost.GameId,
                    AppId      = this.AppId,
                    AppVersion = this.AppVersion,
                    Region     = this.Region,
                    UserId     = info.UserId,
                    Nickname   = info.Nickname,
                    ActorNr    = info.ActorNr,
                    AuthCookie = info.AuthCookie,
                },
                    this.LogIfFailedCallback,
                    info,
                    callAsync: true);
            }
            else
            {
                info.Continue();
            }
        }
コード例 #2
0
ファイル: TestExtra.cs プロジェクト: JerryBian/PhotonSample
 public override void OnJoin(IJoinGameCallInfo info)
 {
     this.onJoinEvent.Set();
     info.Continue();
 }
コード例 #3
0
ファイル: PluginBase.cs プロジェクト: theGameShop/Flipper
 /// <summary>
 /// Calls info.Continue(). Override to change.
 /// </summary>
 /// <param name="info">Data passed in the callback call.</param>
 public virtual void OnJoin(IJoinGameCallInfo info)
 {
     System.Diagnostics.Debug.Assert(this.PluginHost != null);
     info.Continue();
 }
コード例 #4
0
ファイル: TestExtra.cs プロジェクト: cernysw/UnityDemo
 public override void OnJoin(IJoinGameCallInfo info)
 {
     this.onJoinEvent.Set();
     info.Continue();
 }
コード例 #5
0
        public override void OnJoin(IJoinGameCallInfo info)
        {
            // no sync OnJoin support for now - since we already changed the room state when we get here.
            // to allow a clean sync (cancelable OnJoin) we need to
            // a. run all the pre-checks
            // b. call OnJoin with the expected new actornr
            // c. on continue - add peer to room

            if (!string.IsNullOrEmpty(this.gameJoinUrl))
            {
                // remove for callAsync=false
                info.Continue();

                this.PostJsonRequest(
                    this.gameJoinUrl,
                    new WebhooksRequest
                    {
                        Type = "Join",
                        GameId = this.PluginHost.GameId,
                        AppId = this.AppId,
                        AppVersion = this.AppVersion,
                        Region = this.Region,
                        UserId = info.UserId,
                        Nickname = info.Nickname,
                        ActorNr = info.ActorNr,
                        AuthCookie = info.AuthCookie,
                    },
                    this.LogIfFailedCallback,
                    info,
                    callAsync: true);
            }
            else
            {
                info.Continue();
            }
        }
コード例 #6
0
ファイル: PluginBase.cs プロジェクト: JerryBian/PhotonSample
 /// <summary>
 /// Calls info.Continue(). Override to change.
 /// </summary>
 /// <param name="info">Data passed in the callback call.</param>
 public virtual void OnJoin(IJoinGameCallInfo info)
 {
     System.Diagnostics.Debug.Assert(this.PluginHost != null);
     info.Continue();
 }