void Awake() { gameObject.AddComponent <CUIPopup>().buttonClose = OnClickButtonClose; CUIHandle.AddClick(btClose, OnClickButtonClose); CUIHandle.AddClick(btQuit, OnClickButtonQuit); CUIHandle.AddClick(btXacNhan, OnClickButtonXacNhan); }
public void SetData(Announcement model) { item = model; description.text = item.description; money.text = Utility.Convert.Chip(item.money); if (item.currentDay) { description.text = "NHẬN NGAY"; SetSprite("to_day"); CUIHandle.AddClick(GetComponent <CUIHandle>(), DoRecieverGift); } else { description.text = item.description; } if (item.receivered) { Color colorGray = new Color(); colorGray.r = 99f / 255f; colorGray.g = 99f / 255f; colorGray.b = 99f / 255f; colorGray.a = 200f / 255f; image.color = colorGray; Color colorTextDesAlpha = new Color(description.color.r, description.color.g, description.color.b, 90f / 255f); Color colorTextMoneyAlpha = new Color(1f, 1f, 1f, 90f / 255f); description.color = colorTextDesAlpha; money.color = colorTextMoneyAlpha; } }
// Use this for initialization void Awake() { CUIHandle.AddClick(btLogin, OnClickButtonLogin); CUIHandle.AddClick(btForgotPass, OnClickButtonForgot); CUIHandle.AddClick(btRegister, OnClickButtonRegister); CUIHandle.AddClick(facebook, OnBtnFacebookClick); CUIHandle.AddClick(btnHideRegisterForm, OnHideRegisterForm); CUIHandle.AddClick(btnCalling, OnClickCalling); CUIHandle.AddClick(btnLogo, OnClickLogo); GameManager.Instance.applicationStart.EventLoadConfig += OnLoadBroadcast_Messeage; //khi disconnect mọi event sẽ bị mất if (GameManager.Server != null) { ServerCreateInstance(); } GameManager.Instance.EventServerCreateInstance += ServerCreateInstance; //GameManager.Server.EventLoginResponse += OnLogin; //GameManager.Server.EventJoinRoom += OnAfterJoinRoom; //GameManager.Server.EventPluginMessageOnProcess += PluginMessageOnProcess; //fix when reload sences login applicationstart event not start OnLoadBroadcast_Messeage(); LoadListGameLogo(); if (GameManager.Setting.AllowLockScreen) { Screen.sleepTimeout = SleepTimeout.NeverSleep; } }
void Awake() { gameObject.AddComponent <CUIPopup>().buttonClose = OnClickButtonClose; CUIHandle.AddClick(btSend, OnClickButtonForgot); CUIHandle.AddClick(btClose, OnClickButtonClose); }
void OnDestroy() { CUIHandle.RemoveClick(btnGameInfo, OnClickButtonGameInfo); CUIHandle.RemoveClick(btLogout, OnClickButtonLogout); CUIHandle.RemoveClick(btMenuShow, OnClickButtonMenu); CUIHandle.RemoveClick(btProfile, OnClickProfile); CUIHandle.RemoveClick(btSetting, OnClickSetting); CUIHandle.RemoveClick(btSupport, OnClickSupport); CUIHandle.RemoveClick(btnRecharge, OnClickRecharge); CUIHandle.RemoveClick(btnBack, OnClickButtonBack); CUIHandle.RemoveClick(btnMessage, OnClickButtonMessage); CUIHandle.RemoveClick(btnListWaitingHide, OnClickButtonWaitingHide); CUIHandle.AddClick(btnListWaitingShow, OnClickButtonShowListWaiting); // New Function not Implement CUIHandle.RemoveClick(btnQuest, OnClickNewFuncationAlert); CUIHandle.RemoveClick(btnNew, OnClickEvent); CUIHandle.RemoveClick(btnMarket, OnClickMarket); if (!GameManager.IsExist) { return; } GameManager.Server.EventUpdateUserInfo -= OnUpdateUserInfo; GameManager.Server.EventConfigClientChanged -= ConfigClientChangedHandler; }
void Awake() { CUIHandle.AddClick(btCreateRoom, CLickButtonCreate); CUIHandle.AddClick(btQuickplay, ClickButtonQuick); CUIHandle.AddClick(btFilter, OnClickButtonFilter); GameManager.Server.EventPluginMessageOnProcess += OnProcessPluginMessage; GameManager.Server.EventJoinRoom += OnAfterJoinRoom; GameManager.Server.EventPublicMessage += OnPublicMessage; GameManager.Server.EventLoadSence += OnJoinGame; //GameManager.Instance.applicationStart.EventLoadAnnounce += OnLoadAnnounceDone; GameManager.Server.EventAdsChanged += CallBackAdsChangeHandler; //BroadcastView.Instance.ShowInLobby(GameManager.Setting.BroadcastMessage); Debug.Log("Channel selected:" + GameManager.Instance.selectedChannel.roomId + "," + GameManager.Instance.selectedChannel.zoneId);; Debug.Log("Channel chan:" + GameManager.Instance.channelRoom.roomId + "," + GameManager.Instance.channelRoom.zoneId); HeaderMenu.Instance.OnClickButtonBackCallBack = delegate() { WaitingView.Show("Đang thoát"); Debug.Log("Channel current selected:" + GameManager.Instance.channelRoom.roomId + "," + GameManager.Instance.channelRoom.zoneId); GameManager.Server.DoJoinRoom(GameManager.Instance.channelRoom.zoneId, GameManager.Instance.channelRoom.roomId); }; // get name channel showNameChannel(); controller.OnTabbarSelectEvent += OnTabbarSelectHandler; containerFilter.GetComponent <LobbyFilter>().FilterCallBack += FilterHandler; containerFilter.GetComponent <LobbyFilter>().CancelFilterCallBack += CancelFilterHandler; }
void Awake() { gameObject.AddComponent <CUIPopup>().buttonClose = OnCloseClick; CUIHandle.AddClick(btLogin, OnLoginOnClick); CUIHandle.AddClick(btOtherAccount, OnOtherAccountClick); CUIHandle.AddClick(btClose, OnCloseClick); }
void OnDestroy() { CUIHandle.RemoveClick(gameObject.GetComponent <CUIHandle>(), OnClickMe); CUIHandle.RemoveClick(btnRemoveFriend, OnClickRemove); CUIHandle.RemoveClick(btnGift, OnClickGift); CUIHandle.RemoveClick(btnSendMsg, OnClickSendMsg); CUIHandle.AddClick(btnInfo, OnClickBtnInfo); }
void Awake() { GameManager.Server.EventPluginMessageOnProcess += OnProcessPluginMessage; CUIHandle.AddClick(btCreate, OnClickCreate); // show name channel showNameChannel(); GameManager.Server.EventLoadSence += OnJoinGame; }
// Use this for initialization void Start() { if (gameObject.GetComponentInChildren <CUIHandle>() != null) { CUIHandle.AddClick(gameObject.GetComponentInChildren <CUIHandle>(), OnClicViewDetails); } CUIHandle.AddClick(btnPlus, OnClickButtonPlus); }
void Awake() { gameObject.AddComponent <CUIPopup>().buttonClose = OnClickBack; CUIHandle.AddClick(btClose, OnClickBack); CUIHandle.AddClick(btSendFeedback, OnClickSendFeedBack); GameManager.Server.EventConfigClientChanged += ConfigClientHandler; GameManager.Server.EventHelpChanged += EventHelpHandler; }
void Awake() { _instance = this; CUIHandle.AddClick(btnRegister, JoinTournament); CUIHandle.AddClick(btnShow, JoinTournament); GameManager.Server.EventPluginMessageOnProcess += OnProcessPluginMessage; GameManager.Server.EventJoinRoom += OnAfterJoinRoom; RegisterHeaderMenu(); }
void Awake() { input = gameObject.transform.parent.GetComponent <UIInput>(); if (input == null) { input = gameObject.GetComponent <UIInput> (); } CUIHandle.AddClick(btClear, OnClickClear); }
void Awake() { if (btClear == null) { btClear = transform.GetComponentInChildren <CUIHandle>(); } CUIHandle.AddClick(btClear, OnClickClear); }
void Awake() { CUIHandle.AddClick(btEditGeneral, OnClickBeginEditGeneral); CUIHandle.AddClick(btEditSecurity, OnClickBeginEditSecurity); CUIHandle.AddClick(btSaveGeneral, OnClickSaveGeneral); CUIHandle.AddClick(btSaveSecurity, OnClickSaveSecurity); CUIHandle.AddClick(btChangePassword, OnClickChangePass); CUIHandle.AddClick(btChangeAvatar, OnClickChangeAvatar); }
void Awake() { gameObject.AddComponent <CUIPopup>().buttonClose = OnClickButtonClose; CUIHandle.AddClick(btnClose, OnClickButtonClose); GameModelChan.game.Listener.EventLogGameChange += OnLogGame; GameModelChan.game.Listener.EventPlayerListChanged += OnPlayerListChanged; GameModelChan.game.Listener.EventSwapSlot += OnSwapSlot; GameModelChan.game.Listener.EventPlayerWaitingChangePriority += OnLoadPlayerWaiting; controller.tabbarButtons [1].gameObject.SetActive(GameModelChan.YourController != null && GameModelChan.YourController.isMaster); controller.tabbarButtons [2].gameObject.SetActive(GameModelChan.YourController != null && GameModelChan.YourController.isMaster); }
void Start() { gameObject.AddComponent <CUIPopup>().buttonClose = OnClickButtonClose; CUIHandle.AddClick(btnClose, OnClickButtonClose); webView.OnReceivedMessage += OnReceivedMessage; webView.OnLoadComplete += OnLoadComplete; webView.OnWebViewShouldClose += OnWebViewShouldClose; webView.OnEvalJavaScriptFinished += OnEvalJavaScriptFinished; GameManager.Server.EventUpdateUserInfo += GetDataUserInfo; SetWebView(); }
void Awake() { GameManager.Server.EventUpdateUserInfo += OnUpdateUserInfo; CUIHandle.AddClick(listButton.ToArray(), OnClickButtonChannel); CUIHandle.AddClick(btnChip, OnClickButtonChip); CUIHandle.AddClick(btnGold, OnClickButtonGold); GameManager.Server.EventPluginMessageOnProcess += OnProcessPluginMessage; GameManager.Server.EventJoinRoom += OnAfterJoinRoom; HeaderMenu.Instance.ReDraw(); BroadcastView.Instance.ShowInChannel(GameManager.Setting.BroadcastMessage); new AfterJoinChannel(); }
void Start() { gameObject.AddComponent <CUIPopup>().buttonClose = OnClickButtonClose; CUIHandle.AddClick(btnClose, OnClickButtonClose); webView.OnReceivedMessage += OnReceivedMessage; webView.OnLoadComplete += OnLoadComplete; webView.OnWebViewShouldClose += OnWebViewShouldClose; webView.OnEvalJavaScriptFinished += OnEvalJavaScriptFinished; SetWebView(); //webView.url = ServerWeb.URL_REQUEST_EVENT; //webView.Load (); //ServerWeb.StartThread(ServerWeb.URL_REQUEST_EVENT, ResponseHttpHandler); }
void Awake() { gameObject.AddComponent <CUIPopup>().buttonClose = OnClickClose; CUIHandle.AddClick(btnAddFriend, OnClickAddFriend); CUIHandle.AddClick(btnClose, OnClickClose); CUIHandle.AddClick(btnRemoveFriend, OnClickRemoveFriend); CUIHandle.AddClick(btnSendMoney, OnClickSendMoney); CUIHandle.AddClick(btnGift, OnClickGift); CUIHandle.AddClick(btnSendMsg, OnClickSendMsg); CUIHandle.AddClick(btnRemoveInvited, OnClickRemoveInvited); GameManager.Server.EventFriendChanged += OnFriendChanged; GameManager.Server.EventFriendPendingChanged += OnFriendPending; GameManager.Server.EventPluginMessageOnProcess += PluginMessageOnProcess; }
void Start() { GameManager.Server.DoRequestPlugin(Utility.SetEsObject(Fields.REQUEST.GET_USER_ONLINE, new object[] { "zoneId", GameManager.Instance.selectedChannel.zoneId, "roomId", GameManager.Instance.selectedChannel.roomId, })); hadRequest = true; CUIHandle.AddClick(btnAddRobot, OnClickButtonAddRobot); CUIHandle.AddClick(btnInvite, OnClickButtonInvite); if (GameManager.PlayGoldOrChip == "chip") { lbTitle.text = "Chip hiện tại"; } else if (GameManager.PlayGoldOrChip == "gold") { lbTitle.text = "Gold hiện tại"; } }
void Init(NotificationView.EType _type) { Transform trans = panelServer; lbContent = trans.Find("1.3 LableContent").GetComponent <UILabel>(); //buttonClose = trans.FindChild("PopupBackground").GetComponentInChildren<CUIHandle>(); lbTitle = trans.FindChild("1.2 LableTitle").GetComponent <UILabel>(); //buttonYes = trans.Find("1.1 ButtonClose").GetComponent<CUIHandle>(); CUIHandle.AddClick(buttonClose, OnClickClose); CUIHandle.AddClick(buttonYes, delegate(GameObject go) { if (callbackFuntionTryAgainDialog != null) { callbackFuntionTryAgainDialog(); } OnClickClose(go); }); }
void Awake() { CUIHandle.AddClick(imageAds.GetComponent <CUIHandle>(), OnClickAds); CUIHandle.AddClick(btCreateRoom, CLickButtonCreate); CUIHandle.AddClick(btQuickplay, ClickButtonQuick); GameManager.Server.EventPluginMessageOnProcess += OnProcessPluginMessage; GameManager.Server.EventJoinRoom += OnAfterJoinRoom; GameManager.Server.EventLoadSence += OnJoinGame; GameManager.Server.EventPublicMessage += OnPublicMessage; GameManager.Instance.applicationStart.EventLoadAnnounce += OnLoadAnnounceDone; HeaderMenu.Instance.ReDraw(); HeaderMenu.Instance.OnClickButtonBackCallBack = delegate() { WaitingView.Show("Đang thoát"); Debug.Log("Channel current selected:" + GameManager.Instance.channelRoom.roomId + "," + GameManager.Instance.channelRoom.zoneId); GameManager.Server.DoJoinRoom(GameManager.Instance.channelRoom.zoneId, GameManager.Instance.channelRoom.roomId); }; }
void Awake() { this.tournamentInfo = GameManager.Instance.currentTournamentInfo; CUIHandle.AddClick(btnRegister, OnRegister); CUIHandle.AddClick(btnBack, OnClickBack); GameManager.Server.EventPluginMessageOnProcess += OnProcessPluginMessage; GameManager.Server.EventJoinRoom += OnAfterJoinRoom; if (GameManager.CurrentScene == ESceneName.Tournament) { HeaderMenu.Instance.OnClickButtonBackCallBack = delegate() { WaitingView.Show("Đang thoát"); GameManager.Instance.currentTournamentInfo = null; GameManager.Server.DoJoinRoom(GameManager.Instance.currentRoomGiaiDau.zoneId, GameManager.Instance.currentRoomGiaiDau.roomId); }; } GameManager.Instance.displayTournamentMenu = true; HeaderMenu.Instance.ReDraw(); }
void Awake() { Init(); CUIHandle.AddClick(btLogout, OnClickButtonLogout); CUIHandle.AddClick(btMenuShow, OnClickButtonMenu); CUIHandle.AddClick(btMenuHide, OnClickButtonMenuHide); CUIHandle.AddClick(btnMessage, OnClickButtonMessage); CUIHandle.AddClick(btnGameInfo, OnClickButtonGameInfo); CUIHandle.AddClick(btProfile, OnClickProfile); CUIHandle.AddClick(btSetting, OnClickSetting); CUIHandle.AddClick(btSupport, OnClickSupport); CUIHandle.AddClick(btnRecharge, OnClickRecharge); CUIHandle.AddClick(btnBack, OnClickButtonBack); CUIHandle.AddClick(btnListWaitingHide, OnClickButtonWaitingHide); CUIHandle.AddClick(btnListWaitingShow, OnClickButtonShowListWaiting); // New Function not Implement CUIHandle.AddClick(btnQuest, OnClickNewFuncationAlert); CUIHandle.AddClick(btnNew, OnClickEvent); CUIHandle.AddClick(btnMarket, OnClickMarket); GameManager.Server.EventUpdateUserInfo += OnUpdateUserInfo; GameManager.Server.EventConfigClientChanged += ConfigClientChangedHandler; }
void Awake() { CUIHandle.AddClick(btnOk, OnClickFindFriend); GameManager.Server.EventFriendChanged += onFriendChanged; }
void OnDestroy() { CUIHandle.AddClick(gameObject.GetComponent <CUIHandle>(), OnClickChooseCard); }
void Awake() { CUIHandle.AddClick(gameObject.GetComponent <CUIHandle>(), OnClickChooseCard); }
void Awake() { CUIHandle.AddClick(kickButton, DoRequestKickPlayer); CUIHandle.AddClick(btSave, OnClickSave); gridWaitingPlayer.onReposition += OnRepositionGridComplete; }
void Awake() { CUIHandle.AddClick(gameObject.GetComponent <CUIHandle>(), OnClickMe); CUIHandle.AddClick(buttonAccept, ClickAccept); CUIHandle.AddClick(buttonCancel, ClickCancel); }