public override void NetInitHandler(NetInit data) { base.NetInitHandler(data); PlayFab.PlayFabSettings.TitleId = TitleId; ClientStateRP = new ReactiveProperty <ClientState> (ClientState.Uninitialized); RefreshNetInfo("请输入 CustomId 进行登录"); Application.runInBackground = true; CustomTypes.Register(); Client = new EPokerClient(this); Client.AppId = AppId; Client.AppVersion = AppVersion; Client.OnStateChangeAction += this.OnStateChanged; Observable.EveryUpdate().Subscribe(_ => { Client.Service(); }).AddTo(this.gameObject); }
/// <summary> // This method is executed when using this.Publish(new NetInit()) /// </summary> public virtual void NetInitHandler(NetInit data) { // Process the commands information. Also, you can publish new events by using the line below. // this.Publish(new AnotherEvent()) }