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); }
/// <summary> /// 快速开始游戏 /// </summary> public void OnQuickStartGameButton() { lobby.RequestJoinRoom(0); }