private void SetFence() { string grounpId = root.GetComponentInChildren <ListView>().selectGameId; Grounp grounp = ListData.FindGrounpByKey(root.GetComponentInChildren <ListView>().selectGameId); RestFulProxy.SearchState(grounpId, (result) => { result = result.Trim('"'); if (result.Equals("1")) { PlayerPrefs.SetString("grounpId", grounpId); if (grounp != null) { PlayerPrefs.SetFloat("fenceLon", grounp.fenceLon); PlayerPrefs.SetFloat("fenceLat", grounp.fenceLat); PlayerPrefs.SetInt("fenceRadius", grounp.fenceRadius); } SceneTools.instance.LoadScene("Fence"); } else { root.GetComponent <RootEditGameView>().errorMessage.ShowMessage( grounp.name + "游戏已启动,无法再次进行编辑器电子围栏", SoundType.Error); } }); }
private void SetGrounpName() { gameId = GetComponentInParent <RootJoinRoomView>().GetComponentInChildren <ListView>().selectGameId; Grounp grounp = ListData.FindGrounpByKey(gameId); if (grounp != null) { GameName.text = grounp.name; } }