public GameLobbyCarousePlugin Awake(GameObject panel) { this.panel = panel; this.DownGamePicImg = this.panel.transform.Find("DownGamePic").GetComponent <Image>(); this.SaveDownURLPicImg = this.panel.transform.Find("SaveDownURLPic").GetComponent <Image>(); CarouseComponent.instance.SetHallDefault(this.panel); this._rf = this.panel.GetComponent <ReferenceCollector>(); this.lobby = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIHallPanel).GetComponent <GameLobbyCpt>(); this.QRCode = _rf.Get <GameObject>("QRCode").GetComponent <Image>(); ButtonHelper.RegisterButtonEvent(_rf, "CopyQRCodeLink", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); if (UserDataHelper.UserInfo == null) { Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.GetUrlWaitTip); return; } GUIUtility.systemCopyBuffer = GameHelper.GetShareQRCodeURL() + UserDataHelper.UserInfo.PlayerId; Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.CopyURLSuccTip); }); ButtonHelper.RegisterButtonEvent(_rf, "QRCode", () => { Game.PopupComponent.SetClickLock(); Game.PopupComponent.ShowQRCodePanel(); }); ButtonHelper.RegisterButtonEvent(_rf, "DownLoadGame", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); }); ButtonHelper.RegisterButtonEvent(_rf, "SaveDownUrl", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); GUIUtility.systemCopyBuffer = GameHelper.GetShareQRCodeURL() + UserDataHelper.UserInfo.PlayerId; Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.CopyURLSuccTip); }); this.LoadQRCode(); return(this); }
public GameLobbyGameTypeSelectPlugin Awake(GameObject panel) { this.panel = panel; this._GameTypeBg = this.panel; this._rf = this.panel.GetComponent <ReferenceCollector>(); this.lobby = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIHallPanel).GetComponent <GameLobbyCpt>(); GameTypeGoldNumberText = _rf.Get <GameObject>("GameTypeGoldNumberText").Get <Text>(); GameTypeImage = _rf.Get <GameObject>("GameTypeImage").Get <Image>(); GameTypeBgImage = _rf.Get <GameObject>("GameTypeBgImage").Get <Image>(); MaskBg = _rf.Get <GameObject>("MaskBg"); _BackGameListsButton = _rf.Get <GameObject>("BackGameListsButton"); _GameLevelPanel = _rf.Get <GameObject>("GameLevelPanel"); LevelButton_low = _rf.Get <GameObject>("LevelButton_low"); LevelButton_middle = _rf.Get <GameObject>("LevelButton_middle"); LevelButton_high = _rf.Get <GameObject>("LevelButton_high"); ButtonHelper.RegisterButtonEvent(_rf, "BackGameListsButton", () => { this.OnBackGameListsButton(); }); ButtonHelper.RegisterButtonEvent(_rf, "QuickStartGameButton", () => { //this.OnQuickStartGameButton(); }); ButtonHelper.RegisterButtonEvent(_rf, "LevelButton_low", () => { lobby.RequestJoinRoom(0); }); ButtonHelper.RegisterButtonEvent(_rf, "LevelButton_middle", () => { lobby.RequestJoinRoom(1); }); ButtonHelper.RegisterButtonEvent(_rf, "LevelButton_high", () => { lobby.RequestJoinRoom(2); }); return(this); }
public GameLobbyGameListPlugin Awake(GameObject panel) { this.panel = panel; this._GameListsDialog = this.panel; this._rf = this.panel.GetComponent <ReferenceCollector>(); this.lobby = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIHallPanel).GetComponent <GameLobbyCpt>(); this.SubGameDic = new Dictionary <int, SubGame>(); this.SubGameModelDic = new Dictionary <int, ETModel.SubGame>(); this.subGameComponentDic = new Dictionary <int, SubGameComponent>(); this.SubGameModelLoadUIDic = new Dictionary <int, ResGroupLoadUIComponent>(); var subGameInfoList = DataCenterComponent.Instance.gameInfo.SubGameInfoList; for (int i = 0; i < subGameInfoList.Count; i++) { SubGameInfo subGameInfo = subGameInfoList[i]; SubGame subGame = SubGameFactory.Create(subGameInfo.GameID, subGameInfo.Index, this); SubGameDic[i] = subGame; GameObject subGameIcon = _rf.Get <GameObject>(subGameInfo.PrefabName); subGame.GetComponent <SubGameComponent>().SetPanel(subGameIcon, subGameInfo.Index); subGameComponentDic[i] = subGame.GetComponent <SubGameComponent>(); //创建MODEL层子游戏 ETModel.SubGame subGameModel = ETModel.SubGameFactory.Create(subGameInfo.GameID, subGameInfo.Index); SubGameModelDic[i] = subGameModel; subGameModel.GetComponent <ResGroupLoadUIComponent>().SetPanel(subGameIcon, subGameModel.Index); SubGameModelLoadUIDic[i] = subGameModel.GetComponent <ResGroupLoadUIComponent>(); } #region Find this._GameType = _rf.Get <GameObject>("GameType"); //this.ZJHButton = _rf.Get<GameObject>("ZJHButton"); //this.NiuNiuButton = _rf.Get<GameObject>("NiuNiuButton"); //this.BJLButton = _rf.Get<GameObject>("BJLButton"); //this.DZButton = _rf.Get<GameObject>("DZButton"); //this.HongHeiButton = _rf.Get<GameObject>("HongHeiButton"); //this.LongHDButton = _rf.Get<GameObject>("LHDButton"); this.DDZButton = _rf.Get <GameObject>("DDZButton"); //this.SGJButton = _rf.Get<GameObject>("SGJButton"); //this.QZNNButton = _rf.Get<GameObject>("QZNNButton"); //ButtonHelper.RegisterButtonEvent(_rf, "NiuNiuButton", () => //{ // Game.PopupComponent.SetClickLock(); // this.OnNiuNiuButton(); } //); //ButtonHelper.RegisterButtonEvent(_rf, "HongHeiButton", () => //{ // Game.PopupComponent.SetClickLock(); // //this.OnHongHeiButton(); // Game.EventSystem.Run(EventIdType.HongHeiEnterGameModule); //} //); //ButtonHelper.RegisterButtonEvent(_rf, "LHDButton", () => //{ // Game.PopupComponent.SetClickLock(); // Game.EventSystem.Run(EventIdType.OnEnterNHDGameModule); //}); //ButtonHelper.RegisterButtonEvent(_rf, "BJLButton", () => //{ // Game.PopupComponent.SetClickLock(); // Game.EventSystem.Run(EventIdType.OnEnterBJLGameModule); //}); //ButtonHelper.RegisterButtonEvent(_rf, "DZButton", () => //{ // Game.PopupComponent.SetClickLock(); // this.OnDZButton(); //}); //ButtonHelper.RegisterButtonEvent(_rf, "QZNNButton", () => //{ // Game.PopupComponent.SetClickLock(); // Game.EventSystem.Run(EventIdType.OnEnterQZNNGameModule, lobby.GameLobbyGameListPlugin._GameType, lobby.GameLobbyGameTypeSelectPlugin._BackGameListsButton); //}); //ButtonHelper.RegisterButtonEvent(_rf, "ZJHButton", () => //{ // Game.PopupComponent.SetClickLock(); // this.OnZJHButton(); //}); //ButtonHelper.RegisterButtonEvent(_rf, "SGJButton", () => //{ // Game.PopupComponent.SetClickLock(); // this.OnSGJButton(); //}); ButtonHelper.RegisterButtonEvent(_rf, "DDZButton", () => { Game.PopupComponent.SetClickLock(); Game.EventSystem.Run(EventIdType.OnEnterDDZGameModule); }); #endregion this.SetAnimationEffect(); this.InitSubGameResGroup(); this.InitSubGameUpdate(); return(this); }
public GameLobbyTopPlugin Awake(GameObject panel) { this.panel = panel; this.PlayerInfoBg = this.panel.transform.Find("PlayerInfoBg").GetComponent <Image>(); this.lobby = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIHallPanel).GetComponent <GameLobbyCpt>(); this._rf = this.panel.GetComponent <ReferenceCollector>(); this._PlayerIdText = _rf.Get <GameObject>("PlayerIdText").GetComponent <Text>(); this._GoldNumberText = _rf.Get <GameObject>("GoldNumberText").GetComponent <Text>(); this._PlayerNameText = _rf.Get <GameObject>("PlayerNameText").GetComponent <Text>(); this._HeadImage = _rf.Get <GameObject>("HeadImage").GetComponent <Image>(); this.AdressCopyText = _rf.Get <GameObject>("AdressCopyText").GetComponent <Text>(); //this.YuEBaoButton = _rf.Get<GameObject>("YuEBaoButton"); //this.PromotionButton = _rf.Get<GameObject>("PromotionButton"); ButtonHelper.RegisterButtonEvent(_rf, "AdressCopyButton", () => { Game.PopupComponent.SetClickLock(); ETModel.Game.Scene.GetComponent <SoundComponent>().PlayClip(DataCenterComponent.Instance.soundInfo.click); if (UserDataHelper.UserInfo == null) { Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.GetUrlWaitTip); return; } GUIUtility.systemCopyBuffer = GameHelper.GetShareQRCodeURL() + UserDataHelper.UserInfo.PlayerId; Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.CopyURLSuccTip); }); //ButtonHelper.RegisterButtonEvent(_rf, "YuEBaoButton", () => { // Game.PopupComponent.SetClickLock(); // SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); // if (lobby.GameYuEBaoCpt == null) lobby.GameYuEBaoCpt = lobby.AddComponent<GameYuEBaoCpt>(); // lobby.GameYuEBaoCpt.Open(); //}); //ButtonHelper.RegisterButtonEvent(_rf, "PromotionButton", () => { // Game.PopupComponent.SetClickLock(); // SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); // if (lobby.GamePromoteCpt == null) lobby.GamePromoteCpt = lobby.AddComponent<GamePromoteCpt>(); // lobby.GamePromoteCpt.Open(); //}); ButtonHelper.RegisterButtonEvent(_rf, "IDCopyButton", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); GUIUtility.systemCopyBuffer = _PlayerIdText.text; Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.CopyIDSuccTip); }); ButtonHelper.RegisterButtonEvent(_rf, "AdressCopyButton", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); if (UserDataHelper.UserInfo == null) { Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.GetUrlWaitTip); return; } GUIUtility.systemCopyBuffer = GameHelper.GetShareQRCodeURL() + UserDataHelper.UserInfo.PlayerId; Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.CopyURLSuccTip); }); ButtonHelper.RegisterButtonEvent(_rf, "HeadButton", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); if (lobby.GameUserCenterCpt == null) { lobby.GameUserCenterCpt = lobby.AddComponent <GameUserCenterCpt>(); } lobby.GameUserCenterCpt.Open(); }); return(this); }
public GameLobbyBottomPlugin Awake(GameObject panel) { this.panel = panel; this.BottomBg = this.panel.transform.Find("Image (2)").GetComponent <Image>(); this.lobby = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIHallPanel).GetComponent <GameLobbyCpt>(); this._rf = this.panel.GetComponent <ReferenceCollector>(); this.CashButton = _rf.Get <GameObject>("CashButton"); this.MyRecordButton = _rf.Get <GameObject>("MyRecordButton"); //this.ServiceButton = _rf.Get<GameObject>("ServiceButton"); this.NoticeButton = _rf.Get <GameObject>("NoticeButton"); this.PersonSettingButton = _rf.Get <GameObject>("PersonSettingButton"); //动态替换 this.lobbyBg = this.panel.transform.parent.Find("bg").GetComponent <Image>(); //this.ServiceButtonBg = _rf.Get<GameObject>("ServiceButton").transform.Find("Image").GetComponent<Image>(); this.NoticeButtonBg = _rf.Get <GameObject>("NoticeButton").transform.Find("Image").GetComponent <Image>(); this.PersonSettingButtonBg = _rf.Get <GameObject>("PersonSettingButton").transform.Find("Image").GetComponent <Image>(); this.RankButtonBg = _rf.Get <GameObject>("RankButton").transform.Find("Image").GetComponent <Image>(); this.MyRecordButtonBg = _rf.Get <GameObject>("MyRecordButton").transform.Find("Image").GetComponent <Image>(); //公告 ButtonHelper.RegisterButtonEvent(_rf, "NoticeButton", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); this.OnNoticeButton(); }); //设置 ButtonHelper.RegisterButtonEvent(_rf, "PersonSettingButton", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); if (lobby.GamePersonSettingCpt == null) { lobby.GamePersonSettingCpt = lobby.AddComponent <GamePersonSettingCpt>(); } lobby.GamePersonSettingCpt.Open(); }); //排行 ButtonHelper.RegisterButtonEvent(_rf, "RankButton", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); if (lobby.UIRankPanelCpt == null) { lobby.UIRankPanelCpt = lobby.AddComponent <UIRankPanelCpt>(); } lobby.UIRankPanelCpt.OnOpen(); }); //战绩 ButtonHelper.RegisterButtonEvent(_rf, "MyRecordButton", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); if (lobby.GameMyRecordCpt == null) { lobby.GameMyRecordCpt = lobby.AddComponent <GameMyRecordCpt>(); } lobby.GameMyRecordCpt.Open(); }); return(this); }