public override void Show(ArgList args) { base.Show(args); this._txtMessage = transform.FindChild("message").GetComponent <Text>(); string strMessage = args.GetAt <string>(0); this._txtMessage.text = strMessage; Vector3 pos = args.GetAt <Vector3>(1); float angel = args.GetAt <float>(2); Init(pos, angel); }
public override void OnEnter(ArgList args) { _wnd = UIManager.Instance.ShowWindow <LoadingWindow>("LoadingWindow", null, false); _wnd.CCB = OnCompelete; LoadConfig(); this.Fsm.Owner.StartCoroutine(LoadScene(args.GetAt <string>(0))); this._tableId = args.GetAt <int>(1); this._tableName = args.GetAt <string>(2); this._tableRate = args.GetAt <int>(3); this._sceneId = args.GetAt <int>(4); //this._strPos = args.GetAt<string>(2); }
public override void Show(ArgList args) { base.Show(args); this._tips = transform.FindChild("tips").GetComponent <Text>(); this._tips.text = args.GetAt <string>(0); }
public override void Show(ArgList args) { base.Show(args); _nWidthOfScreen = FishingCamera.Instance.WIDTH; _transQuitPanel = transform.FindChild("QuitPanel"); _transTableOption = transform.FindChild("TableOption"); _transTopPanel = transform.FindChild("TopPanel"); _transPlayerInSeatInfo = transform.FindChild("PlayerInfoPanel"); _playerInSeatInfoPanel = _transPlayerInSeatInfo.gameObject.AddComponent <PlayerInSeatInfoPanel>(); _playerInSeatInfoPanel.Init(); Text txtNickName = _transTopPanel.FindChild("TxtNickName").GetComponent <Text>(); Text txtGold = _transTopPanel.FindChild("Gold").FindChild("ImgFrame").FindChild("TxtValue").GetComponent <Text>(); Text txtLottery = _transTopPanel.FindChild("Lottery").FindChild("ImgFrame").FindChild("TxtValue").GetComponent <Text>(); Image imgHeadIcon = _transTopPanel.FindChild("ImgHeadIconFrame").FindChild("ImgHeadIcon").GetComponent <Image>(); _player = Game.Instance.player; txtNickName.text = _player.NickName; txtGold.text = _player.Gold.ToString(); txtLottery.text = _player.Lottery.ToString(); imgHeadIcon.overrideSprite = ResourceMgr.Instance.CreatHeadIconSprite(_player.PhotoId); _transQuitPanel.SetActive(false); var btnGoBack = transform.FindChild("BtnGoBack").GetComponent <Button>(); btnGoBack.onClick.AddListener(this.OnGoBack); var btnQuitMakeSure = _transQuitPanel.FindChild("QuitFrame").FindChild("BtnMakeSure").GetComponent <Button>(); btnQuitMakeSure.onClick.AddListener(this.OnQuitMakeSure); var btnQuitCancel = _transQuitPanel.FindChild("QuitFrame").FindChild("BtnCancel").GetComponent <Button>(); btnQuitCancel.onClick.AddListener(this.OnQuitCancel); var btnQuickStart = _transTableOption.FindChild("BtnQuickStart").GetComponent <Button>(); btnQuickStart.onClick.AddListener(this.OnQuickStart); var btnLastPage = _transTableOption.FindChild("BtnLastPage").GetComponent <Button>(); btnLastPage.onClick.AddListener(this.OnLastPage); var btnNextPage = _transTableOption.FindChild("BtnNextPage").GetComponent <Button>(); btnNextPage.onClick.AddListener(this.OnNextPage); _sliderPageNum = transform.FindChild("SliderPageNum").GetComponent <Slider>(); Transform transTablePages = transform.FindChild("TablePages"); int i; for (i = 0; i < transTablePages.childCount; i++) { Page page = transTablePages.GetChild(i).gameObject.AddComponent <Page>(); page.init(this); _pageList.Add(page); } //If the page number passed in args is 0, it means that requesting table info of page is needed. if (args.GetAt <int>(0) == 0) { NetWorkManager.Instance.reqSelectMode("free", result => { if (result.code == Constants.SUCCESS) { _nPageNumber = /*result.page*/ 0; _tableInfoList = /*result.pageData*/ result.tables; _nAllPages = /*result.tableNum*/ result.tables.Count / NUMBER_OF_TABLE_PER_PAGE + 1; _pageNumSliderInit(); if (_nAllPages <= 10) { _sliderPageNum.value = _nPageNumber - 1; } else { _sliderPageNum.value = (_nPageNumber + 1) / 2 - 1; } _fillPage(_nIndexOfWhichPageShowing); } }); } else { _nPageNumber = args.GetAt <int>(0); _tableInfoList = args.GetAt <List <TableInfo> >(1); _nAllPages = args.GetAt <int>(2) / NUMBER_OF_TABLE_PER_PAGE + 1; _pageNumSliderInit(); if (_nAllPages <= 10) { _sliderPageNum.value = _nPageNumber - 1; } else { _sliderPageNum.value = (_nPageNumber + 1) / 2 - 1; } _fillPage(_nIndexOfWhichPageShowing); } }