public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { greenBg = (GImage)com.GetChildAt(0); WinBg = (GImage)com.GetChildAt(1); SimpleBg = (GImage)com.GetChildAt(2); ShowIn = (GTextField)com.GetChildAt(3); n13 = (GGroup)com.GetChildAt(4); } }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; n0 = null; n9 = null; n10 = null; Btn_Login = null; Btn_Registe = null; accountInput = null; passwordInput = null; accountText = null; Tex_LoginInfo = null; ToTestSceneBtn = null; passwordText = null; n16 = null; t0 = null; t1 = null; }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; m_Gro_ShowVersionInfo = null; m_n0 = null; m_n9 = null; m_n10 = null; m_Btn_Login.Dispose(); m_Btn_Login = null; m_Btn_Registe.Dispose(); m_Btn_Registe = null; m_accountInput = null; m_passwordInput = null; m_accountText = null; m_Tex_LoginInfo = null; m_ToTestSceneBtn.Dispose(); m_ToTestSceneBtn = null; m_passwordText = null; m_Gro_LoginInfo = null; m_t0 = null; m_t1 = null; }
public bool SetListCSS(GObject item, object[] roleRecord, int index) { bool isVisible = true; GGroup itemObj = item.asCom.GetChild("item").asGroup; GImage itemBg = item.asCom.GetChild("itemBg").asImage; itemBg.visible = true; itemObj.visible = true; if (index % 2 == 0) { itemBg.visible = false; } if (roleRecord.Length <= listCssNum && roleRecord.Length > 0) { if (index > roleRecord.Length - 1) { isVisible = false; itemObj.visible = false; } } if (!isVisible) { item.touchable = false; } return(isVisible); }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { bg = (GImage)com.GetChild("bg"); contentBG = (GImage)com.GetChild("contentBG"); accountBg = (GImage)com.GetChild("accountBg"); accountInput = (GTextInput)com.GetChild("accountInput"); passwordBg = (GImage)com.GetChild("passwordBg"); passwordInput = (GTextInput)com.GetChild("passwordInput"); loginButton = FGUITitleButton.Create(domain, com.GetChild("loginButton")); registButton = FGUITitleButton.Create(domain, com.GetChild("registButton")); content = (GGroup)com.GetChild("content"); } }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_ViewState = this.GetControllerAt(0); m_BuildType = this.GetControllerAt(1); m_BuildButtonState = this.GetControllerAt(2); m_MainMenuState = this.GetControllerAt(3); m_ListMenu = (GList)this.GetChildAt(1); m_Menu = (GGroup)this.GetChildAt(2); m_LabelVisitorCount = (GTextField)this.GetChildAt(8); m_LabelVisitorLike = (GTextField)this.GetChildAt(9); m_LabelIncome = (GTextField)this.GetChildAt(10); m_LabelMoney = (GTextField)this.GetChildAt(11); m_BtnMenu = (GButton)this.GetChildAt(12); m_BtnCloseEdit = (GButton)this.GetChildAt(13); m_BtnEnterBuild = (GButton)this.GetChildAt(17); m_BtnUndo = (GButton)this.GetChildAt(18); m_ListBuildItems = (GList)this.GetChildAt(19); m_ListBuildingObjects = (GList)this.GetChildAt(20); m_ComMenus = (GGroup)this.GetChildAt(21); m_BtnResetData = (GButton)this.GetChildAt(22); m_ListLand = (GList)this.GetChildAt(27); m_ListFence = (GList)this.GetChildAt(28); m_GroupFenceArea = (GGroup)this.GetChildAt(29); m_ListEditingObjects = (GList)this.GetChildAt(31); m_BtnEnterEdit = (GButton)this.GetChildAt(32); m_EditStatePanel = (GGroup)this.GetChildAt(33); m_GroupBuildButton = (GGroup)this.GetChildAt(40); m_BtnHand = (GButton)this.GetChildAt(41); m_BtnLook = (GButton)this.GetChildAt(42); }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; Gro_ShowVersionInfo = null; n0 = null; n9 = null; n10 = null; Btn_Login = null; Btn_Registe = null; accountInput = null; passwordInput = null; accountText = null; Tex_LoginInfo = null; ToTestSceneBtn = null; passwordText = null; Gro_LoginInfo = null; Gros_Detail_BackGround = null; n26 = null; Gro_Detail = null; Btn_VersionInfo = null; Gro_VersionInfo = null; t0 = null; t1 = null; Anim_VersionHide = null; Anim_VersionShow = null; }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { n0 = (GImage)com.GetChildAt(0); Tittle = (GTextField)com.GetChildAt(1); Conten = (GTextField)com.GetChildAt(2); tow_cancel = tow_cancel.Create(com.GetChildAt(3)); tow_confirm = one_confirm.Create(com.GetChildAt(4)); towmode = (GGroup)com.GetChildAt(5); one_confirm = one_confirm.Create(com.GetChildAt(6)); onemode = (GGroup)com.GetChildAt(7); } }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); _mainView = this.GetComponent <UIPanel>().ui; _btnGroup = _mainView.GetChild("g0").asGroup; _g1 = UIPackage.CreateObject("Transition", "BOSS").asCom; _g2 = UIPackage.CreateObject("Transition", "BOSS_SKILL").asCom; _g3 = UIPackage.CreateObject("Transition", "TRAP").asCom; _g4 = UIPackage.CreateObject("Transition", "GoodHit").asCom; _g5 = UIPackage.CreateObject("Transition", "PowerUp").asCom; _g5.GetTransition("t0").SetHook("play_num_now", __playNum); _g6 = UIPackage.CreateObject("Transition", "PathDemo").asCom; _mainView.GetChild("btn0").onClick.Add(() => { __play(_g1); }); _mainView.GetChild("btn1").onClick.Add(() => { __play(_g2); }); _mainView.GetChild("btn2").onClick.Add(() => { __play(_g3); }); _mainView.GetChild("btn3").onClick.Add(__play4); _mainView.GetChild("btn4").onClick.Add(__play5); _mainView.GetChild("btn5").onClick.Add(() => { __play(_g6); }); }
void Start() { Application.targetFrameRate = 60; GRoot.inst.SetContentScaleFactor(1136, 640); Stage.inst.onKeyDown.Add(OnKeyDown); UIPackage.AddPackage("UI/Transition"); _mainView = UIPackage.CreateObject("Transition", "Main").asCom; _mainView.fairyBatching = true; _mainView.SetSize(GRoot.inst.width, GRoot.inst.height); _mainView.AddRelation(GRoot.inst, RelationType.Size); GRoot.inst.AddChild(_mainView); _btnGroup = _mainView.GetChild("g0").asGroup; _g1 = UIPackage.CreateObject("Transition", "BOSS").asCom; _g2 = UIPackage.CreateObject("Transition", "BOSS_SKILL").asCom; _g3 = UIPackage.CreateObject("Transition", "TRAP").asCom; _g4 = UIPackage.CreateObject("Transition", "GoodHit").asCom; _g5 = UIPackage.CreateObject("Transition", "PowerUp").asCom; _g5.GetTransition("t0").SetHook("play_num_now", __playNum); _mainView.GetChild("btn0").onClick.Add(() => { __play(_g1); }); _mainView.GetChild("btn1").onClick.Add(() => { __play(_g2); }); _mainView.GetChild("btn2").onClick.Add(() => { __play(_g3); }); _mainView.GetChild("btn3").onClick.Add(__play4); _mainView.GetChild("btn4").onClick.Add(__play5); }
protected override void OnInitPanel() { base.OnInitPanel(); killNumber = contentPane.GetChild("Tex_KillNumber").asTextField; numberButtons = contentPane.GetChild("Group_KillNumber").asGroup; transition = contentPane.GetTransition("t0"); killTransition = contentPane.GetTransition("t1"); for (int i = 0; i < contentPane.numChildren; i++) { if (contentPane.GetChildAt(i).group == numberButtons) { GButton gButton = contentPane.GetChildAt(i).asButton; gButton.onClick.Add(() => { killNumber.text = gButton.title.ToString(); messageManager.wolfKillNumber = System.Convert.ToInt32(gButton.title); }); } } certainButton.onClick.Add(() => { controller.selectedIndex = 2; messageController.selectedIndex = 2; transition.Stop(); killTransition.Play(() => { killNumber.text = 0.ToString(); AfterAction(UIPanelType.WitchPanel); }); }); }
public override void Init() { base.Init(); this.Create(Config.SCENE_SHIP, true, null); redPosX = 155; redPosY = 0; cardModel = ModelManager.inst.cardModel; InitTopBar(new string[] { Tools.GetMessageById("24109"), Tools.GetMessageById("24110") }); c1 = this.GetController("c1"); tabC1 = c1; c1.onChanged.Add(Tab_Change); GButton btn_esc = this.GetChild("n1").asButton; red = this.GetChild("n12").asGroup; redTxt = this.GetChild("n11").asTextField; red.alpha = 0; // tab = this.GetChild ("barClip") as ComTabEffect; btn_esc.onClick.Add(onCloseHandler); // tab.SetCount (2, 3); Tab_Change(); this.AddGlobalListener(MainEvent.COLOR_CHANGE, OnFunction); this.AddGlobalListener(MainEvent.CARD_LEVELUP, OnlevelUp); this.AddGlobalListener(MainEvent.JUMP_COINGOLDEXPGET, OnDongHuaFun); this.AddGlobalListener(MainEvent.LEVEL_UP_USER, OnUserLevelup); OnFunction(); oldRednum = (int)ModelManager.inst.userModel.records [Config.ASSET_REDBAGCOIN] < 0 ? 0 : (int)ModelManager.inst.userModel.records [Config.ASSET_REDBAGCOIN]; }
public void Stage(GComponent stage, bool draw = false) { isDraw = draw; userModel = ModelManager.inst.userModel; this.stage = stage; this.stage.visible = false; // if (Convert.ToInt32 (userModel.records ["guide"]) == 2) // return; view = Tools.GetComponent(Config.COM_GUIDE).asCom; this.stage.AddChild(view); mask = view.GetChild("n0").asGraph; ViewManager.SetWidthHeight(mask); text = view.GetChild("n3").asTextField; content = view.GetChild("n1").asGroup; btn1 = view.GetChild("n5").asButton; add = new GComponent(); view.GetChild("n2").asGraph.ReplaceMe(add); btn1.onClick.Add(() => { Clear(); DispatchManager.inst.Dispatch(new MainEvent(MainEvent.GUIDE_UPDATE_OK, null)); // SetGuild(4); // this.guide11++; // this.guide12 = 0; // this.stage.visible = false; }); mask.onClick.Add(Mask_Click); this.guide11 = 0; this.guide12 = 0; if (isDraw) { mask.visible = false; } }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_c1 = this.GetControllerAt(0); m_container = (GComponent)this.GetChildAt(1); m_btn_Back = (GButton)this.GetChildAt(3); m_btn_Button = (GButton)this.GetChildAt(4); m_btn_Image = (GButton)this.GetChildAt(5); m_btn_Graph = (GButton)this.GetChildAt(6); m_btn_MovieClip = (GButton)this.GetChildAt(7); m_btn_Depth = (GButton)this.GetChildAt(8); m_btn_Loader = (GButton)this.GetChildAt(9); m_btn_List = (GButton)this.GetChildAt(10); m_btn_ProgressBar = (GButton)this.GetChildAt(11); m_btn_Slider = (GButton)this.GetChildAt(12); m_btn_ComboBox = (GButton)this.GetChildAt(13); m_btn_Clip_Scroll = (GButton)this.GetChildAt(14); m_btn_Controller = (GButton)this.GetChildAt(15); m_btn_Relation = (GButton)this.GetChildAt(16); m_btn_Label = (GButton)this.GetChildAt(17); m_btn_Popup = (GButton)this.GetChildAt(18); m_btn_Window = (GButton)this.GetChildAt(19); m_btn_Drag_Drop = (GButton)this.GetChildAt(20); m_btn_Component = (GButton)this.GetChildAt(21); m_btn_Grid = (GButton)this.GetChildAt(22); m_btn_Text = (GButton)this.GetChildAt(23); m_btns = (GGroup)this.GetChildAt(24); }
private void FindObject() { // tab = this.GetChild("n1") as ComTabEffect; back = this.GetChild("n2").asButton; back.GetChild("title").asTextField.textFormat.size = 30; back.text = Tools.GetMessageById("24111"); back.onClick.Add(onCloseHandel); tabC1 = this.GetController("c1"); // frind_left_tab_0 = this.GetChild("bar0").asButton; frind_left_tab_1 = this.GetChild("bar1").asButton; // // // tab_root_0 = this.GetChild ("n3").asButton; // tab_root_1 = this.GetChild ("n4").asButton; //tab_root_2 = this.GetChild("n7").asButton; bg2 = this.GetChild("bg2").asGroup; bg3 = this.GetChild("bg3"); bg4 = this.GetChild("bg4"); // bg =this.GetChild("n0"); // bg.visible = false; //tabC1 = this.GetController("c1"); // tabC1.onChanged.Add(On_Root_Change); // tabC1.onChangeTip.Add(Tab_Change_Check); // tabC1.changeObj.Add(tab_root_2); // bool ok=userModel.GetUnlcok(Config.UNLOCK_SHARD, tab_root_2); // if (ok) // { // tab.SetCount(3, 3); // } // else // { // tab.SetCount(2, 3); // } // if (roleModel.tab_Select1 != -1 && roleModel.tab_Select1 != 0) // { // tabC1.selectedIndex = roleModel.tab_Select1; // roleModel.tab_Select1 = -1; // } // else // { // this.On_Root_Change(); // } Init_LeftTab(new string[] { Tools.GetMessageById("19907"), Tools.GetMessageById("19906") }, "tabLeft"); tabC2.onChanged.Add(On_Left_Change0); if (roleModel.tab_Select2 != -1 && roleModel.tab_Select2 != 0) { tabC2.selectedIndex = roleModel.tab_Select2; roleModel.tab_Select2 = -1; } else { this.On_Left_Change0(); } }
public override void OnBeforeEnter() { //获取游戏组件 MiniMapCamera = GameObject.Find("MiniMapCamera").GetComponent <Camera>(); if (!PlayerPrefs.HasKey("Sound")) { PlayerPrefs.SetInt("Sound", 1); SoundManager.Instance.Mute = false; } else { int mute = PlayerPrefs.GetInt("Sound"); SoundManager.Instance.Mute = mute == 1 ? false : true; } //获取FairyGUI组件 this.contentPane.MakeFullScreen(); BagMenuButton = this.contentPane.GetChild("BagButton").asButton; StatusMenuButton = this.contentPane.GetChild("StatusButton").asButton; EquipButton = this.contentPane.GetChild("EquipButton").asButton; SkillButton = this.contentPane.GetChild("SkillButton").asButton; SystemButton = this.contentPane.GetChild("SettingButton").asButton; ShortCutList = this.contentPane.GetChild("ShortCutList").asList; HpSlider = this.contentPane.GetChild("HPSlider").asSlider; MpSlider = this.contentPane.GetChild("MPSlider").asSlider; ExpSlider = this.contentPane.GetChild("ExpSlider").asSlider; Name = this.contentPane.GetChild("Name").asTextField; Lv = this.contentPane.GetChild("LV").asTextField; Face = this.contentPane.GetChild("Face").asGraph; MiniMap = this.contentPane.GetChild("MiniMap").asGraph; MiniMapZoomInButton = this.contentPane.GetChild("ZoomIn").asButton; MiniMapZoomOutButton = this.contentPane.GetChild("ZoomOut").asButton; Gameover = this.contentPane.GetChild("GameOver").asGroup; QuitGameButton = this.contentPane.GetChild("QuitGameButton").asButton; Mask = this.contentPane.GetChild("Mask").asGroup; //添加组件事件 BagMenuButton.onClick.Add(() => { UIWindowManager.Instance.OpenWindow(UIWindowTypes.BagMenuWindow); }); StatusMenuButton.onClick.Add(() => { UIWindowManager.Instance.OpenWindow(UIWindowTypes.StatusMenuWindow); }); EquipButton.onClick.Add(() => { UIWindowManager.Instance.OpenWindow(UIWindowTypes.EquipMenuWindow); }); SkillButton.onClick.Add(() => { UIWindowManager.Instance.OpenWindow(UIWindowTypes.SkillMenuWindow); }); SystemButton.onClick.Add(() => { UIWindowManager.Instance.OpenWindow(UIWindowTypes.SystemMenuWindow); }); MiniMapZoomInButton.onClick.Add(OnZoomInButtonDown); MiniMapZoomOutButton.onClick.Add(OnZoomOutButtonDown); QuitGameButton.onClick.Add(OnQuitGameButtonDown); //添加通知事件 PlayerStatusManager.Instance.LvUP += UpdateUI; PlayerStatusManager.Instance.UpdateUI += UpdateUI; PlayerStatusManager.Instance.Death += PlayerDeath; //组件显示操作 HpSlider.touchable = false; MpSlider.touchable = false; ExpSlider.touchable = false; Mask.visible = false; Gameover.visible = false; ShowFace(); ShowMiniMap(); ShortCutManager.Instance.SetShortCutToList(ShortCutList); UpdateUI(); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); n0 = (GImage)GetChildAt(0); processbar = (CheckForResUpdateBar)GetChildAt(1); updateInfo = (GTextField)GetChildAt(2); n4 = (GGroup)GetChildAt(3); }
public void initUI() { UIPanel panel = gameObject.GetComponent <UIPanel>(); GComponent view = panel.ui; // 整个UI的集合 m_avatar = new GComponent[3]; m_avatar[0] = view.GetChild("AvatarGuard").asCom; m_avatar[1] = view.GetChild("AvatarTaoxi").asCom; m_avatar[2] = view.GetChild("AvatarComp").asCom; // 上面的对话框 m_dialog = view.GetChild("Dialog").asLabel; m_dialog.text = ""; m_nextButton = view.GetChild("NextButton").asButton; m_nextButton.onClick.Add(nextButton_Click); m_clue = view.GetChild("Clue").asGroup; m_clue1 = view.GetChild("Clue1").asGroup; initClueList(); GButton clueOKButton = view.GetChild("ClueOKButton").asButton; clueOKButton.onClick.Add(clueOKButton_Click); m_clueName = view.GetChild("ClueName").asLabel; m_clueContent = view.GetChild("ClueContent").asLabel; m_cluePoint = view.GetChild("CluePoint").asLabel; m_clueContent = m_clueContent.GetChild("Label").asLabel; m_clueContent.text = ""; GComponent clueCloseButton = view.GetChild("ClueCloseButton").asCom; clueCloseButton.onClick.Add(clueCloseButton_Click); m_entrance = view.GetChild("Entrance").asGroup; m_console = view.GetChild("Console").asGroup; GButton collectionButton = view.GetChild("CollectButton").asButton; collectionButton.onClick.Add(collectionButton_Click); GButton driveButton = view.GetChild("DriveButton").asButton; driveButton.onClick.Add(driveButton_Click); GComponent wallpaper = view.GetChild("Wallpaper").asCom; GComponent map = wallpaper.GetChild("Map").asCom; map.onClick.Add(map_Click); GComponent brain = wallpaper.GetChild("Brain").asCom; brain.onClick.Add(brain_Click); GComponent ball = wallpaper.GetChild("Ball").asCom; ball.onClick.Add(ball_Click); GComponent desk = wallpaper.GetChild("Desk").asCom; desk.onClick.Add(desk_Click); GComponent comp = wallpaper.GetChild("Comp").asCom; comp.onClick.Add(comp_Click); }
public MenuView(GComponent view) { View = view; bg = view.GetChild("bg").asGraph; menu = view.GetChild("menu").asGroup; bg.onClick.Add(OnBgClick); bg.onRightClick.Add(OnBgClick); calls.Clear(); }
public override void Init() { m_group = contentPane.GetChild("button_group").asGroup; m_button = contentPane.GetChild("n0").asButton; m_button.onClick.Add(() => { Kernel.UiManager.HideWindow(GetType(), false); Kernel.UiManager.OpenWindow(typeof(Boss), null); }); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_ChooseHero = this.GetControllerAt(0); m_Request = this.GetControllerAt(1); m_ChangeSeatController = this.GetControllerAt(2); m_PlayerInfo0 = (UI_PlayerSimpleInfo)this.GetChildAt(1); m_PlayerInfo1 = (UI_PlayerSimpleInfo)this.GetChildAt(2); m_PlayerInfo2 = (UI_PlayerSimpleInfo)this.GetChildAt(3); m_PlayerInfo3 = (UI_PlayerSimpleInfo)this.GetChildAt(4); m_PlayerInfo4 = (UI_PlayerSimpleInfo)this.GetChildAt(5); m_PlayerInfo5 = (UI_PlayerSimpleInfo)this.GetChildAt(6); m_PlayerInfo6 = (UI_PlayerSimpleInfo)this.GetChildAt(7); m_PlayerInfo7 = (UI_PlayerSimpleInfo)this.GetChildAt(8); m_EventDeckCount = (GTextField)this.GetChildAt(13); m_ActionDeckCount = (GTextField)this.GetChildAt(17); m_MainSize = (UI_MainSize)this.GetChildAt(19); m_RoundInfo = (GTextField)this.GetChildAt(20); m_TurnInfo = (GTextField)this.GetChildAt(21); m_NowEvent = (UI_Card)this.GetChildAt(26); m_DelayAction = (GList)this.GetChildAt(27); m_ActionDropDeck = (GTextField)this.GetChildAt(29); m_EventDropDeckCount = (GTextField)this.GetChildAt(32); m_PlayerHero = (UI_Card)this.GetChildAt(34); m_GameInfo = (UI_Log)this.GetChildAt(36); m_Hand = (UI_HandCards)this.GetChildAt(37); m_SetEvent = (UI_Card)this.GetChildAt(38); m_NowTheme = (GComponent)this.GetChildAt(41); m_ThemeDeckCount = (GTextField)this.GetChildAt(46); m_ActivePlayer = (GTextField)this.GetChildAt(48); m_TimeBar = (GProgressBar)this.GetChildAt(50); m_NowAction = (UI_Card)this.GetChildAt(51); m_UseTip = (GTextField)this.GetChildAt(62); m_skills = (GList)this.GetChildAt(63); m_useCard = (GButton)this.GetChildAt(65); m_Endturn = (GButton)this.GetChildAt(66); m_freeUse = (GGroup)this.GetChildAt(67); m_choose_y = (GButton)this.GetChildAt(69); m_choose_n = (GButton)this.GetChildAt(70); m_chooseCard = (GGroup)this.GetChildAt(71); m_choiceList = (GList)this.GetChildAt(73); m_takeChoice = (GGroup)this.GetChildAt(74); m_requestList = (GList)this.GetChildAt(76); m_ChooseRequest = (GGroup)this.GetChildAt(77); m_limitUse = (GButton)this.GetChildAt(78); m_limitUseCancel = (GButton)this.GetChildAt(79); m_forward = (GButton)this.GetChildAt(81); m_backward = (GButton)this.GetChildAt(82); m_setcard = (GButton)this.GetChildAt(83); m_chooseDirection = (GGroup)this.GetChildAt(84); m_HeroChooseWindow = (UI_ChooseHero)this.GetChildAt(86); m_ChangeSeatPanel = (UI_ChangeSeat)this.GetChildAt(87); Init(); }
public override void Init() { base.Init(); this.Create(Config.COM_LOAD); gp = this.GetChild("n0").asGroup; gg = this.GetChild("n3").asGraph; EffectManager.inst.AddEffect(Config.EFFECT_LOADING, "icon_loading", gg, null, false, 50); gp.visible = false; TimerManager.inst.Add(2f, 1, Time_Tick); }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { login2RegisterController = com.GetControllerAt(0); bgBtn = bgBtn.Create(com.GetChildAt(0)); frameReg = WindowFrame1.Create(com.GetChildAt(1)); ConfirmBtn = Button.Create(com.GetChildAt(2)); RegAccIn = (GTextInput)com.GetChildAt(3); n83 = (GTextField)com.GetChildAt(4); n84 = (GImage)com.GetChildAt(5); n86 = (GGroup)com.GetChildAt(6); RegPWIn = (GTextInput)com.GetChildAt(7); n88 = (GTextField)com.GetChildAt(8); n89 = (GImage)com.GetChildAt(9); n91 = (GGroup)com.GetChildAt(10); RegConfirmIn = (GTextInput)com.GetChildAt(11); n93 = (GTextField)com.GetChildAt(12); n94 = (GImage)com.GetChildAt(13); n96 = (GGroup)com.GetChildAt(14); Register = (GGroup)com.GetChildAt(15); Login = (GGroup)com.GetChildAt(16); frameLogin = WindowFrame1.Create(com.GetChildAt(17)); n80 = (GGroup)com.GetChildAt(18); pwIn = (GTextInput)com.GetChildAt(19); n78 = (GImage)com.GetChildAt(20); n77 = (GTextField)com.GetChildAt(21); loginBtn = Button.Create(com.GetChildAt(22)); n53 = (GGroup)com.GetChildAt(23); accIn = (GTextInput)com.GetChildAt(24); n51 = (GImage)com.GetChildAt(25); n50 = (GTextField)com.GetChildAt(26); regBtn = Button.Create(com.GetChildAt(27)); } }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_ViewState = this.GetControllerAt(0); m_frame = (GLabel)this.GetChildAt(0); m_BtnJump = (GComponent)this.GetChildAt(1); m_TypeList = (GList)this.GetChildAt(2); m_LoaderIcon = (GLoader)this.GetChildAt(3); m_AttrList = (GList)this.GetChildAt(4); m_ListBuyItem = (GList)this.GetChildAt(7); m_GroupBuy = (GGroup)this.GetChildAt(8); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_ViewState = this.GetControllerAt(0); m_LoaderIcon = (GLoader)this.GetChildAt(1); m_LabelName = (GTextField)this.GetChildAt(2); m_LabelAttr1 = (GTextField)this.GetChildAt(3); m_LabelAttr2 = (GTextField)this.GetChildAt(4); m_LabelAttr3 = (GTextField)this.GetChildAt(5); m_LabelAttr4 = (GTextField)this.GetChildAt(6); m_BtnRemove = (GButton)this.GetChildAt(7); m_GroupInfo = (GGroup)this.GetChildAt(8); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); ctrlAction = this.GetController("ctrlAction"); imgAvatar = (GLoader)this.GetChild("imgAvatar"); pgsHp = (HpBar)this.GetChild("pgsHp"); txtAttack = (GTextField)this.GetChild("txtAttack"); grpAttack = (GGroup)this.GetChild("grpAttack"); lstBuff = (GList)this.GetChild("lstBuff"); tOnHit = this.GetTransition("tOnHit"); tAttackLeft = this.GetTransition("tAttackLeft"); tAttackLeftBack = this.GetTransition("tAttackLeftBack"); tActionFade = this.GetTransition("tActionFade"); tDead = this.GetTransition("tDead"); }
public override void OnBeforeEnter() { Stage.inst.onKeyDown.Add(OnKeyDown); this.contentPane.MakeFullScreen(); StartBG = this.contentPane.GetChild("StartBG").asImage; StartBG.MakeFullScreen(); Tran = this.contentPane.GetTransition("Glitter"); gliterImage = this.contentPane.GetChild("GlitterImage").asImage; this.contentPane.GetTransition("SceneStart").Play(); StartButtonGroup = this.contentPane.GetChild("StartButton").asGroup; NewGameButton = this.contentPane.GetChild("NewGameButton").asButton; LoadGameButton = this.contentPane.GetChild("LoadGameButton").asButton; NewGameButton.onClick.Add(OnNewGameButtonDown); LoadGameButton.onClick.Add(OnLoadGameButtonDown); StartButtonGroup.visible = false; }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; login2RegisterController = null; bgBtn.Dispose(); bgBtn = null; frameReg.Dispose(); frameReg = null; ConfirmBtn.Dispose(); ConfirmBtn = null; RegAccIn = null; n83 = null; n84 = null; n86 = null; RegPWIn = null; n88 = null; n89 = null; n91 = null; RegConfirmIn = null; n93 = null; n94 = null; n96 = null; Register = null; Login = null; frameLogin.Dispose(); frameLogin = null; n80 = null; pwIn = null; n78 = null; n77 = null; loginBtn.Dispose(); loginBtn = null; n53 = null; accIn = null; n51 = null; n50 = null; regBtn.Dispose(); regBtn = null; }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_c1 = this.GetController("c1"); m_ui = (GImage)this.GetChild("ui"); m_background = (GImage)this.GetChild("background"); m_bagBtn = (UI_BagButton)this.GetChild("bagBtn"); m_n57 = (GImage)this.GetChild("n57"); m_n94 = (UI_JinHuaYeMianAnNiu)this.GetChild("n94"); m_n95 = (UI_JingJiYeMianAnNiu)this.GetChild("n95"); m_n97 = (UI_ShangDianYeMian)this.GetChild("n97"); m_n70 = (GGroup)this.GetChild("n70"); m_gold_table = (GImage)this.GetChild("gold_table"); m_gold_text = (GTextField)this.GetChild("gold_text"); m_gold = (GImage)this.GetChild("gold"); m_gold_show = (GGroup)this.GetChild("gold_show"); m_lv = (GImage)this.GetChild("lv"); m_n26 = (GTextField)this.GetChild("n26"); m_lv_show = (GGroup)this.GetChild("lv_show"); m_name_table = (GImage)this.GetChild("name_table"); m_name = (GTextField)this.GetChild("name"); m_name_show = (GGroup)this.GetChild("name_show"); m_diamond_table = (GImage)this.GetChild("diamond_table"); m_diamond = (GImage)this.GetChild("diamond"); m_diamond_text = (GTextField)this.GetChild("diamond_text"); m_diamond_show = (GGroup)this.GetChild("diamond_show"); m_n108 = (UI_SheZhi)this.GetChild("n108"); m_n88 = (UI_DuanZaoYeMianAnNiu)this.GetChild("n88"); m_n89 = (UI_JiNengYeMianAnNiu)this.GetChild("n89"); m_n90 = (UI_JiangLiYeMianAnNiu)this.GetChild("n90"); m_n91 = (UI_JunTuanYeMianAnNiu)this.GetChild("n91"); m_n92 = (UI_RenWuYeMianAnNiu)this.GetChild("n92"); m_button_scence = (GGroup)this.GetChild("button_scence"); m_n106 = (GImage)this.GetChild("n106"); m_hero = (GImage)this.GetChild("hero"); m_n111 = (GImage)this.GetChild("n111"); m_n115 = (UI_TanSuoShiJie)this.GetChild("n115"); m_n113 = (UI_TiaoZhanBOSS)this.GetChild("n113"); m_n116 = (UI_WuDaoDaHui)this.GetChild("n116"); m_enemy = (GImage)this.GetChild("enemy"); m_n117 = (UI_TongTianMoTa)this.GetChild("n117"); m_hero_headbar = (UI_HeadBar)this.GetChild("hero_headbar"); m_enemy_headbar = (UI_HeadBar)this.GetChild("enemy_headbar"); m_n114 = (GGroup)this.GetChild("n114"); m_mailList = (GList)this.GetChild("mailList"); }
//初始化 protected override void OnInitPanel() { base.OnInitPanel(); //特性内内容 cardButtons = contentPane.GetChild("Group_Cards").asGroup; crystalBall = contentPane.GetChild("Crystal").asCom; certainButton.onClick.Add(() => { AfterAction(UIPanelType.HunterPanel); }); toNextButton = contentPane.GetChild("Btn_ToNext").asButton; toNextButton.onClick.Add(() => { AfterAction(UIPanelType.HunterPanel); }); for (int i = 0; i < contentPane.numChildren; i++) { if (contentPane.GetChildAt(i).group == cardButtons) { GButton gButton = contentPane.GetChildAt(i).asButton; Vector2 gButtonPos = gButton.xy;//拿到了初始位置的坐标 gButton.draggable = true; Controller IDcontroller = gButton.GetController("c1"); gButton.onDragEnd.Add(() => { if (GRoot.inst.touchTarget.name == "Crystal") { //查验身份 controller.selectedIndex = 2; messageController.selectedIndex = 2; for (int j = 0; j < messageManager.wolves.Length; j++) { if (System.Convert.ToInt32(gButton.title) == messageManager.wolves[j]) { IDcontroller.selectedIndex = 2; } } if (IDcontroller.selectedIndex != 2) { IDcontroller.selectedIndex = 1; } DOTween.To(() => gButton.xy, x => gButton.xy = x, gButtonPos, 1); } else { //返回原处 DOTween.To(() => gButton.xy, x => gButton.xy = x, gButtonPos, 1); } }); } } }