protected override void onClick(GameObject BtObject) { if (BtObject.name.Equals("ensureBt")) { ActionParam param = new ActionParam(); param["roomID"] = -1; param["roomName"] = roomName.text; param["playerName"] = GameSetting.Instance.PlayerName; WebLogic.Instance.Send((int)ActionType.JoinRoom, param); } if (BtObject.name.Equals("cancleBt") || BtObject.name.Equals("OtherPanel")) { XzoomTween x = GetComponentInChildren <XzoomTween>(); x.isBig = false; x.isSmall = true; Destroy(gameObject, 2f); } }
protected override bool Event(ActionParam param) { int id = (int)param["ActionType"]; if (id == (int)ActionType.JoinRoom) { int b = -1; if ((b = (int)param["success"]) != -1) { GameSetting.Instance.roomID = b; GameSetting.Instance.roomName = roomName.text; XzoomTween x = GetComponentInChildren <XzoomTween>(); x.isBig = false; x.isSmall = true; Destroy(gameObject, 1f); SceneMgr.Instance.SceneSwitch(SceneState.SceneInRoom); } } return(false); }