// Use this for initialization void Start() { if (_continueButton == null) { _continueButton = _mainMenu.transform.GetComponentInChildren <ContinueBtn>(); } }
void ReleaseDesignerOutlets() { if (ContinueBtn != null) { ContinueBtn.Dispose(); ContinueBtn = null; } if (FloatingBottomView != null) { FloatingBottomView.Dispose(); FloatingBottomView = null; } if (TermsTableView != null) { TermsTableView.Dispose(); TermsTableView = null; } if (TermsTitle != null) { TermsTitle.Dispose(); TermsTitle = null; } }
void ReleaseDesignerOutlets() { if (DescriptionBottomlbl != null) { DescriptionBottomlbl.Dispose(); DescriptionBottomlbl = null; } if (DescriptionTopLbl != null) { DescriptionTopLbl.Dispose(); DescriptionTopLbl = null; } if (Input != null) { Input.Dispose(); Input = null; } if (ContinueBtn != null) { ContinueBtn.Dispose(); ContinueBtn = null; } }
void ReleaseDesignerOutlets() { if (BoyButton != null) { BoyButton.Dispose(); BoyButton = null; } if (BubbleImg != null) { BubbleImg.Dispose(); BubbleImg = null; } if (BubbleImgTopOffset != null) { BubbleImgTopOffset.Dispose(); BubbleImgTopOffset = null; } if (ContinueBtn != null) { ContinueBtn.Dispose(); ContinueBtn = null; } if (GirlButton != null) { GirlButton.Dispose(); GirlButton = null; } if (Input != null) { Input.Dispose(); Input = null; } if (NavBarBlendView != null) { NavBarBlendView.Dispose(); NavBarBlendView = null; } if (NavBarBlendViewHeightConstraint != null) { NavBarBlendViewHeightConstraint.Dispose(); NavBarBlendViewHeightConstraint = null; } if (NickName != null) { NickName.Dispose(); NickName = null; } if (SwitchSignUpType != null) { SwitchSignUpType.Dispose(); SwitchSignUpType = null; } if (ThemeSelectorContainerView != null) { ThemeSelectorContainerView.Dispose(); ThemeSelectorContainerView = null; } }
public void GamePause() { Time.timeScale = 0f; PauseBtn.SetActive(false); ContinueBtn.SetActive(true); RestartBtn.SetActive(true); JoyStickBtn.SetActive(false); ArchiveBtn.SetActive(false); }
/// <summary> /// Initialise Form /// </summary> public WelkomeScreen() { InitializeComponent(); WelkomeLbl.Text = Res.WelkomeLbl; RegistrationBtn.BigBtnSetStyle(Res.RegisterBtn); ContinueBtn.BigBtnSetStyle(Res.ContinueBtn); CloseBtn.BigBtnSetStyle(Res.CloseBtn); UpdateScreen(); }
public void GameContinue() { Time.timeScale = 1f; PauseBtn.SetActive(true); ContinueBtn.SetActive(false); JoyStickBtn.SetActive(true); RestartBtn.SetActive(false); ArchiveBtn.SetActive(false); GameOverText.SetActive(false); StartBtn.SetActive(false); }
private void _timer_Tick(object sender, EventArgs e) { if (_waitSecs == 0) { _timer.Stop(); ContinueBtn.Content = "确定"; ContinueBtn.IsEnabled = true; ContinueBtn.Focus(); return; } string btnContent = $"确定 {_waitSecs--}s"; ContinueBtn.Content = btnContent; }
public void StartDialog(Dialog dialog) { Debug.Log("starting conversation with " + nameText); nameText.text = dialog.name; StartBtn.SetActive(false); ContinueBtn.SetActive(true); sentences.Clear(); foreach (string sentence in dialog.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
/// <summary> /// TestFail method created specificly for the courses AUTOMATION_001 and _002, _003it will take a test and fail with credentials below /// It will take test 3 times and fails and returning GCEP Library Page /// </summary> /// TODO : remove Threads sleep after flickiring isssue will be fixed public dynamic TestFail() { Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(160), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(420), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); Thread.Sleep(5000); ContinueBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(160), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(420), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); Thread.Sleep(5000); ContinueBtn.Click(); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(125), ElementCriteria.IsEnabled); int i = 0; do { Thread.Sleep(1000); TestLaunchBtn.Click(); Thread.Sleep(0500); Browser.SwitchTo().Frame(PostTestFrame); ElemSet.RdoBtn_ClickMultipleByText(Browser, "B. False", "A. Harmful, abusive", "A. Low grade/poor class evaluation"); Thread.Sleep(0500); TestSubmitBtn.Click(); Thread.Sleep(0500); FrameCloseBtn.Click(); i++; } while (i < 3); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(160), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(125), ElementCriteria.IsEnabled, ElementCriteria.IsVisible); Thread.Sleep(5000); ContinueBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(160), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(160), ElementCriteria.IsEnabled); Thread.Sleep(5000); ContinueBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(160), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.CertificateCloseBtn, TimeSpan.FromSeconds(135), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); Thread.Sleep(5000); CertificateCloseBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(160), ElementCriteria.IsNotVisible); return(new GCEPLibraryPage(Browser)); }
/// <summary> /// TestPass method created specificly for the courses AUTOMATION_001 and _002, _003 it will take a test and faipass with credentials below /// GCEP Library Page /// </summary> /// TODO : remove Threads sleep after flickiring isssue will be fixed public dynamic TestPass() { WaitForInitialize(); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(125), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); ContinueBtn.Click(); Thread.Sleep(2000); WaitForInitialize(); ContinueBtn.Click(); //Thread.Sleep(2000); //WaitForInitialize(); //ContinueBtn.Click(); WaitForInitialize(); TestLaunchBtn.Click(); Thread.Sleep(0500); Browser.SwitchTo().Frame(PostTestFrame); ElemSet.RdoBtn_ClickMultipleByText(Browser, "A. True", "B. Harmful, injurious", "D. All of the above"); TestSubmitBtn.Click(); Thread.Sleep(0500); FrameCloseBtn.Click(); Thread.Sleep(0500); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(125), ElementCriteria.IsEnabled); Thread.Sleep(1000); ContinueBtn.Click(); WaitForInitialize(); Thread.Sleep(1000); ContinueBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(90), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.CertificateCloseBtn, TimeSpan.FromSeconds(95), ElementCriteria.IsEnabled); Thread.Sleep(4000); CertificateCloseBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(90), ElementCriteria.IsNotVisible); return(new GCEPPage(Browser)); }
/// <summary> /// Clicks the user-specified button or link and then waits for a window to close or open, or a page to load, /// depending on the button that was clicked /// </summary> /// <param name="buttonOrLinkElem">The element to click on</param> public void ClickToAdvance(IWebElement buttonOrLinkElem) { if (Browser.Exists(Bys.CourseTestPage.ContinueBtn)) { if (buttonOrLinkElem.GetAttribute("xpath") == ContinueBtn.GetAttribute("xpath")) { ContinueBtn.Click(); Browser.WaitForElement(Bys.CourseTestPage.AssessmentTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); //new WebDriverWait(Browser, TimeSpan.FromSeconds(15)).Until(ExpectedConditions.UrlContains("Courses.aspx")); // return new EducationCenterPage(Browser); } else { throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, or if the button is already added, then the page you were on did not contain the button."); } } // return null; }
public dynamic LearnerTestPass() { Thread.Sleep(15000); // Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(25), ElementCriteria.IsEnabled); ContinueBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(25), ElementCriteria.IsEnabled); ContinueBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); // Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(25), ElementCriteria.IsEnabled); Browser.WaitForElement(Bys.CourseTestPage.AssessmentTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); ContinueBtn.Click(); TestLaunchBtn.Click(); Thread.Sleep(0500); Browser.SwitchTo().Frame(PostTestFrame); ElemSet.RdoBtn_ClickMultipleByText(Browser, "A. True", "B. Harmful, injurious", "D. All of the above"); TestSubmitBtn.Click(); Thread.Sleep(0500); FrameCloseBtn.Click(); Thread.Sleep(0500); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(25), ElementCriteria.IsEnabled); ContinueBtn.Click(); // Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); ////Browser.WaitForElement(Bys.CourseTestPage.ContinueBtn, TimeSpan.FromSeconds(25), ElementCriteria.IsEnabled); //ContinueBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); Browser.WaitForElement(Bys.CourseTestPage.CertificateCloseBtn, TimeSpan.FromSeconds(35), ElementCriteria.IsEnabled); CertificateCloseBtn.Click(); Browser.Navigate().Refresh(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); return(new EducationCenterPage(Browser)); }
public SignInPage Continue() { ContinueBtn.Click(); return(new SignInPage(_driver, _wait)); }
public dynamic TakeTest(string role, string testStatus) { if (role == "Resident" && testStatus == "Pass") { Thread.Sleep(5000); // WaitForInitialize(); // Browser.WaitForElement(Bys.CourseTestPage.AssessmentTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); ContinueBtn.Click(); Thread.Sleep(5000); // WaitForInitialize(); Thread.Sleep(0500); Browser.SwitchTo().Frame(PostTestFrame); ElemSet.RdoBtn_ClickMultipleByText(Browser, "A. True", "B. Harmful, injurious", "D. All of the above"); TestSubmitBtn.Click(); Thread.Sleep(0500); FrameCloseBtn.Click(); Thread.Sleep(0500); Thread.Sleep(5000); // WaitForInitialize(); // Browser.WaitForElement(Bys.CourseTestPage.AssessmentTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); ContinueBtn.Click(); Thread.Sleep(5000); //Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); //Browser.WaitForElement(Bys.CourseTestPage.CertificateCloseBtn, TimeSpan.FromSeconds(35), ElementCriteria.IsEnabled); CertificateCloseBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); return(new GCEPLibraryPage(Browser)); } else if (role == "Resident" && testStatus == "Fail") { Thread.Sleep(5000); // WaitForInitialize(); // Browser.WaitForElement(Bys.CourseTestPage.AssessmentTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); ContinueBtn.Click(); Thread.Sleep(5000); // WaitForInitialize(); int i = 0; do { Thread.Sleep(0500); TestLaunchBtn.Click(); Thread.Sleep(0500); Browser.SwitchTo().Frame(PostTestFrame); ElemSet.RdoBtn_ClickMultipleByText(Browser, "B. False", "A. Harmful, abusive", "A. Low grade/poor class evaluation"); Thread.Sleep(0500); TestSubmitBtn.Click(); Thread.Sleep(0500); FrameCloseBtn.Click(); i++; } while (i < 3); Thread.Sleep(0500); // WaitForInitialize(); // Browser.WaitForElement(Bys.CourseTestPage.AssessmentTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); ContinueBtn.Click(); Thread.Sleep(5000); // WaitForInitialize(); // Browser.WaitForElement(Bys.CourseTestPage.AssessmentTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); ContinueBtn.Click(); Thread.Sleep(5000); //Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); //Browser.WaitForElement(Bys.CourseTestPage.CertificateCloseBtn, TimeSpan.FromSeconds(35), ElementCriteria.IsEnabled); CertificateCloseBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.IsNotVisible); return(new GCEPLibraryPage(Browser)); } return(null); }
void Awake() { Application.runInBackground = true; //防止后台掉线 CustomTypes.Register(); _client = new PhotonClient(); _client.AppId = "49395063-2a0e-4e1f-a35d-3d4600790bc2"; //Turnbased 的 ID //_client.AppId="bc31b098-957d-4231-9ad5-b75adc3c6fb7";// RealTime 的ID bool connectInProcess = _client.ConnectToRegionMaster("asia"); _go_GuessBricks = GameObject.Find("GuessBricks").transform; MyDock = GameObject.Find("DockD").transform; PickPop = GameObject.Find("PickPop").transform; _planet = GameObject.Find("Planet"); _table = _planet.transform.GetChild(0).gameObject; _unOccupied = _table.transform.GetChild(5).gameObject; //--------------找到UI元素------------ Notify = GetComponent <Notification>(); Panel = GameObject.Find("Panel").transform; StartBtn = GameObject.Find("Start").transform; _canvas = GameObject.Find("Canvas"); _winBanner = GameObject.Find("Win").transform; _panel = GameObject.Find("Panel"); _readyPanel = GameObject.Find("ReadyPanel"); _overPanel = GameObject.Find("OverPanel"); DoneBtn = GameObject.Find("AdjustDone").transform; CancelBtn = GameObject.Find("Cancel").transform; ContinueBtn = GameObject.Find("ContinueGuess").transform; _loading = GameObject.Find("Loading").transform; //----------------------- if (GameControl._instance == null) { GameControl._instance = this; } DontDestroyOnLoad(gameObject); #region 注册UI事件 GameObject.Find("Create").GetComponent <Button>().onClick.AddListener( () => { if (_roomName != "") { _client.OpCreateRoom(_roomName, new RoomOptions() { MaxPlayers = _playerNum }, TypedLobby.Default); } }); GameObject.Find("Join").GetComponent <Button>().onClick.AddListener( () => { if (_roomName != "") { _client.OpJoinRoom(_roomName); } }); GameObject.Find("PlayerNum").GetComponent <Dropdown>().onValueChanged .AddListener(x => { _playerNum = (byte)(x + 2); }); GameObject.Find("RoomName").GetComponent <InputField>().onValueChanged .AddListener(x => { _roomName = x; }); GameObject.Find("Leave").GetComponent <Button>().onClick.AddListener( () => { //销毁玩家头像 foreach (var icon in _playerIcons) { Destroy(icon.gameObject); } _playerIcons.Clear(); //通知其他人 我离开了 _client.OpRaiseEvent(MyEventCode.OneLeave, _myID, true, RaiseEventOptions.Default); _client.OpLeaveRoom(false); _overPanel.SetActive(false); _panel.SetActive(true); }); GameObject.Find("Again").GetComponent <Button>().onClick.AddListener( () => { //currentID 为自己 CurrentID = _myID; //重新设置玩家头像的parent for (int i = 0; i < _playerNum; i++) { var icon = _playerIcons[i]; icon.SetParent(_readyPanel.transform); } //自己的头像放到readypos 并且通知别人 //playerIcons readyPos的顺序和id一样 注意ID从1 开始 var myIcon = _playerIcons[_myID - 1]; AnimElement.Prepare() .InitUGUI(myIcon.localPosition, readyPos[_myID - 1], myIcon, 0, 40) .AddScaleAnimation(myIcon.localScale, Vector3.one * 0.6f) .Play(); _client.OpRaiseEvent(MyEventCode.OnePlayAgain, _myID, true, RaiseEventOptions.Default); //载入等待面板 _overPanel.SetActive(false); _readyPanel.SetActive(true); EnterRoom(_playerNum); }); //房主开始游戏 GameObject.Find("Start").GetComponent <Button>().onClick.AddListener( () => { //洗牌 ShuffleDeck(); //----------------------------- //把所有的牌发送给其他玩家 //----------------------- _client.OpRaiseEvent(MyEventCode.SyncAllBricks, indexMap, true , RaiseEventOptions.Default); //放置牌到桌子上 PlaceAllBricksOnTable(indexMap); StartGame(); }); // 完成 按钮的点击逻辑 DoneBtn.GetComponent <Button>().onClick.AddListener(() => { // 玩家确认完成Adjust过程中的joker放置后 点击 if (GameState.Instance.CurrentState == GameState.State.Adjust) { //通知其他玩家在逻辑层更新我的Joker位置 int msgType = 0; int[] msg = new int[4]; msg[0] = _myID; if (_decks[_myDeckIndex].Contains(_jokerWhite)) { msgType = -1; msg[2] = _decks[_myDeckIndex].IndexOf(_jokerWhite); } if (_decks[_myDeckIndex].Contains(_jokerBlack)) { msgType = -msgType; msg[3] = _decks[_myDeckIndex].IndexOf(_jokerBlack); } msg[1] = msgType; _client.OpRaiseEvent(MyEventCode.SyncJoker, msg, true, RaiseEventOptions.Default); // LocalReadyToGo(); //隐藏所有arrows for joker _jokerBlack.GetComponent <Brick>().DestroyArrows(); _jokerWhite.GetComponent <Brick>().DestroyArrows(); } // 每一round中抽到joker的玩家确认完成joker的放置后点击 else if (GameState.Instance.CurrentState == GameState.State.PlacingJoker) { //进入Guess状态 GameState.Instance.CurrentState = GameState.State.GuessABrick; //视觉提示 让我猜牌 Notify.autoNtf("请猜牌", Vector2.zero, new Vector2(1, 1), 1); //隐藏所有arrows for joker _jokerBlack.GetComponent <Brick>().DestroyArrows(); _jokerWhite.GetComponent <Brick>().DestroyArrows(); } else if (GameState.Instance.CurrentState == GameState.State.GuessingABrick) { //不猜了 轮到下一个玩家 ToNextOne(); //隐藏按钮 ContinueBtn.gameObject.SetActive(false); DoneBtn.gameObject.SetActive(false); //切换状态 GameState.Instance.CurrentState = GameState.State.WaitForOthers; } DoneBtn.gameObject.SetActive(false); }); //取消猜牌按钮的点击逻辑 CancelBtn.GetComponent <Button>().onClick.AddListener(() => { CancelBtn.gameObject.SetActive(false); //隐藏所有PossibleBrick HidePossibleBricks(); //状态回到GuessABrick GameState.Instance.CurrentState = GameState.State.GuessABrick; }); //继续猜 ContinueBtn.GetComponent <Button>().onClick.AddListener(() => { GameState.Instance.CurrentState = GameState.State.GuessABrick; ContinueBtn.gameObject.SetActive(false); DoneBtn.gameObject.SetActive(false); }); #endregion //----初始化UI状态---------- _readyPanel.SetActive(false); DoneBtn.gameObject.SetActive(false); CancelBtn.gameObject.SetActive(false); ContinueBtn.gameObject.SetActive(false); Panel.gameObject.SetActive(false); StartBtn.gameObject.SetActive(false); _overPanel.SetActive(false); //-------------------------------------- }
public void LogInToApp(string pass) { Password.SendKeys(pass); ContinueBtn.Click(); System.Threading.Thread.Sleep(2000); }
void Start() { sentences = new Queue <string>(); ContinueBtn.SetActive(false); }