/// <summary>Attempt a disconnect, if still connected.</summary> public void OnApplicationQuit() { if (this.GameClientInstance != null && this.GameClientInstance.loadBalancingPeer != null) { this.GameClientInstance.Disconnect(); this.GameClientInstance.loadBalancingPeer.StopThread(); } this.GameClientInstance = null; }
public void Awake() { if (string.IsNullOrEmpty(this.AppId)) { Debug.LogError("You must enter your AppId from the Dashboard in the component: Scripts, MemoryGui, AppId before you can use this demo."); Debug.Break(); } Application.runInBackground = true; CustomTypes.Register(); this.GameClientInstance = new MemoryGameClient(); this.GameClientInstance.memoryGui = this; this.GameClientInstance.AppId = this.AppId; // set in Inspector this.GameClientInstance.AppVersion = "1.0"; board = this.GetComponentInChildren<MemoryBoard>(); board.GameClientInstance = this.GameClientInstance; GameClientInstance.board = board; board.MemoryGui = this; this.DisableButtons(); }
public void Awake() { if (string.IsNullOrEmpty(this.AppId)) { Debug.LogError("You must enter your AppId from the Dashboard in the component: Scripts, MemoryGui, AppId before you can use this demo."); Debug.Break(); } Application.runInBackground = true; CustomTypes.Register(); this.GameClientInstance = new MemoryGameClient(); this.GameClientInstance.memoryGui = this; this.GameClientInstance.AppId = this.AppId; // set in Inspector this.GameClientInstance.AppVersion = "1.0"; board = this.GetComponentInChildren <MemoryBoard>(); board.GameClientInstance = this.GameClientInstance; GameClientInstance.board = board; board.MemoryGui = this; this.DisableButtons(); }