public void SpaceDropLogic(int num) { Click.Play(); if (num == 0) // start game { SceneManager.LoadScene("_Scene_0"); } if (num == 3) // show space shooter history { SpaceHistoryDropdown.ClearOptions(); LoadSpaceHistoryDropdown(); SpaceHistoryPan.SetActive(true); Border.SetActive(true); CopyText.SetActive(false); CreatedByText.SetActive(false); MainText.SetActive(false); LogoutButton.SetActive(false); CopyBG.SetActive(false); } else // open configurations or game levels { OpenPannel2 = SpaceFileItems[num]; OpenPannel2.SetActive(true); Border.SetActive(true); CopyText.SetActive(false); CreatedByText.SetActive(false); MainText.SetActive(false); LogoutButton.SetActive(false); CopyBG.SetActive(false); } }
public ShellStreamDeligater Expect(Regex regex) { Stream.Expect(regex); while (!regex.IsMatch(CopyText.ToString())) { Thread.Sleep(50); } return(this); }
public ShellStreamDeligater CopyEnd() { LastCopiedTest = CopyText.Length > 0 ? CopyText.ToString() : "EMPTY"; if (IsWriteConsole) { Console.WriteLine($"복사 완료 : {LastCopiedTest}"); } ActionUtility.UI(() => System.Windows.Clipboard.SetText(LastCopiedTest)).Wait(); return(this); }
public void ExitSpaceHistory() { Click.Play(); Border.SetActive(false); SpaceHistoryPan.SetActive(false); CopyText.SetActive(true); CreatedByText.SetActive(true); MainText.SetActive(true); LogoutButton.SetActive(true); CopyBG.SetActive(true); }
public void ExitSpacePannel() { Click.Play(); Border.SetActive(false); OpenPannel2.SetActive(false); CopyText.SetActive(true); CreatedByText.SetActive(true); MainText.SetActive(true); LogoutButton.SetActive(true); CopyBG.SetActive(true); }
public ShellStreamDeligater Expect(Regex regex, TimeSpan timeout) { if (Stream.Expect(regex, timeout) == null) { throw new TimeoutException(); } while (!regex.IsMatch(CopyText.ToString())) { Thread.Sleep(50); } return(this); }
public ShellStreamDeligater(ShellStream stream) { if ((Stream = stream) == null) { throw new ArgumentNullException(nameof(stream)); } stream.DataReceived += (sender, args) => { var text = Encoding.Default.GetString(args.Data); CopyText.Append(text); if (IsWriteConsole) { Console.Write(text); } IsReceived = true; }; }
public void ExitSpaceGameLevelsPannel() { int NumofEisGood = 0; int ScoreisGood = 0; if (BronzeLevel.NumofE < SilverLevel.NumofESilver && SilverLevel.NumofESilver < GoldLevel.NumofEGold) { NumofEisGood = 1; } else { NumofEisGood = 0; } if (BronzeLevel.ScoreToWin < SilverLevel.ScoreToWinSilver && SilverLevel.ScoreToWinSilver < GoldLevel.ScoreToWinGold) { ScoreisGood = 1; } else { ScoreisGood = 0; } if (ScoreisGood == 1 && NumofEisGood == 1) { Click.Play(); Border.SetActive(false); OpenPannel2.SetActive(false); CopyText.SetActive(true); CreatedByText.SetActive(true); MainText.SetActive(true); LogoutButton.SetActive(true); CopyBG.SetActive(true); } else { SpaceErrorPan.SetActive(true); SpaceLevelsExitButton.interactable = false; } }
public void FileDropLogic(int num) { Click.Play(); if (num == 0 && Users.CurrentUser.username != "admin") // if you are not the admin accessing user accounts { CreateUserMenuButton.interactable = false; DeleteUserMenuButton.interactable = false; UnBlockUserMenuButton.interactable = false; } if (num == 3) // if you are exiting the game { Users.CurrentUser.Logins.Add(new SessionLogObject()); Users.DumpUsers(); Application.Quit(); PlayerPrefs.DeleteAll(); } if (num == 2) // if you click on the history item { HistoryDropdown.ClearOptions(); if (Users.CurrentUser.username != "admin") // if you are not the admin { LoadHistoryDropdown(); // load the non-admin history } else // if you are the admin { LoadHistoryDropdownAdmin(); // load the admin history } } OpenPannel = FileItems[num]; OpenPannel.SetActive(true); Border.SetActive(true); CopyText.SetActive(false); CreatedByText.SetActive(false); MainText.SetActive(false); LogoutButton.SetActive(false); CopyBG.SetActive(false); }
public void MemDropLogic(int num) { Click.Play(); if (num == 1) // show memory game history { LoadHistoryDropdownMem(); MemHistoryPan.SetActive(true); Border.SetActive(true); CopyText.SetActive(false); CreatedByText.SetActive(false); MainText.SetActive(false); LogoutButton.SetActive(false); CopyBG.SetActive(false); } else // start game { SceneManager.LoadScene("MemMainMenu"); } }
public void RPSDropLogic(int num) { Click.Play(); if (num == 1) // show rock paper scissors history { LoadHistoryDropdownRPS(); RPSHistoryPan.SetActive(true); Border.SetActive(true); CopyText.SetActive(false); CreatedByText.SetActive(false); MainText.SetActive(false); LogoutButton.SetActive(false); CopyBG.SetActive(false); } else // start game { SceneManager.LoadScene("SinglePlayer"); } }
public void AppleDropLogic(int num) { Click.Play(); if (num == 1) // show Apple picker history { LoadHistoryDropdownApple(); AppleHistoryPan.SetActive(true); Border.SetActive(true); CopyText.SetActive(false); CreatedByText.SetActive(false); MainText.SetActive(false); LogoutButton.SetActive(false); CopyBG.SetActive(false); } else // start game { SceneManager.LoadScene("ApplePickerGame"); } }
public ShellStreamDeligater CopyStart() { CopyText.Clear(); return(this); }
protected virtual void OnCopyText(CopyTextEventArgs e) { CopyText?.Invoke(this, e); }