void ReleaseDesignerOutlets() { if (MainTableView != null) { MainTableView.Dispose(); MainTableView = null; } if (NameEntry != null) { NameEntry.Dispose(); NameEntry = null; } if (ResetButton != null) { ResetButton.Dispose(); ResetButton = null; } if (StreetEntry != null) { StreetEntry.Dispose(); StreetEntry = null; } }
void ReleaseDesignerOutlets() { if (PauseButton != null) { PauseButton.Dispose(); PauseButton = null; } if (ResetButton != null) { ResetButton.Dispose(); ResetButton = null; } if (StartButton != null) { StartButton.Dispose(); StartButton = null; } if (Surface != null) { Surface.Dispose(); Surface = null; } }
public frmMain() { InitializeComponent(); listItemDelegate = new AddListItem(AddListItemMethod); AddTextDelegate = new AddText(AddtextMethod); resetButtonDelegate = new ResetButton(ResetButtonMethod); }
public override void ResetLevel() { base.ResetLevel(); foreach (GameObject ob in Buttons) { ob.SetActive(false); } ResetButton.SetActive(false); transform.Find("Validate").gameObject.SetActive(true); transform.Find("Next").gameObject.SetActive(false); foreach (Transform part in NameSelector.transform) { bool allowSwitchOff = part.GetComponent <ToggleGroup>().allowSwitchOff; if (allowSwitchOff == true || part.GetComponentsInChildren <Toggle>().Length > 1) { part.GetComponent <ToggleGroup>().allowSwitchOff = true; foreach (Toggle tog in part.GetComponentsInChildren <Toggle>()) { tog.isOn = false; } part.GetComponent <ToggleGroup>().allowSwitchOff = allowSwitchOff; } } Transform n = transform.Find("Name").Find("Text"); foreach (Transform go in n.transform) { Destroy(go.gameObject); } }
public Form1() { InitializeComponent(); ResetButton.Hide(); NextButton.Hide(); DeleteAnswersButton.Hide(); }
// Åbner dialogbox til indlæsning af data private void LoadButton_Click(object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult dr = fbd.ShowDialog(); if (dr == DialogResult.OK) { string[] CPPath = Directory.GetFiles(fbd.SelectedPath, "*utm"); string[] RunnersPath = Directory.GetFiles(fbd.SelectedPath, "*.gpx"); if (CPPath.Count() > 0 && RunnersPath.Count() > 0) { LoadControlPoints(CPPath.First()); LoadRunners(RunnersPath); LoadLegs(); Put_Data(MainLeg); LoadButton.Hide(); ResetButton.Show(); player.StartUp(); } else if (CPPath.Count() == 0) { MessageBox.Show("Controlpoints not found in selected folder"); } else if (RunnersPath.Count() == 0) { MessageBox.Show("GPX Files not found in selected folder"); } } }
public override void InitBindings() { ChooseFancyButton.SetOnClickCommand(ViewModel.AskUserAboutFancyThingsCommand); ShowFancyButton.SetOnClickCommand(ViewModel.ShowLastFanciedThingCommand); ResetButton.SetOnClickCommand(ViewModel.ResetFanciness); NavigateButton.SetOnClickCommand(ViewModel.NavigateSomewhereElseCommand); ShowDialogButton.SetOnClickCommand(ViewModel.ShowDialogCommand); ShowDifferentDialogButton.SetOnClickCommand(ViewModel.ShowDialogBCommand); }
public void resettime() { Thread.Sleep(5000); resetconfirm = false; ResetButton.Invoke((MethodInvoker) delegate { ResetButton.Text = "Reset"; }); }
// --- Hides the Level Select --- public void hideMenu() { LoadingScreenUI.SetActive(true); mainMenuPanel.SetActive(false); ResetButton.SetActive(true); LoadingScreenUI.SetActive(false); }
private void ShowOptions() { hook.Dispose(); options = ShowOptionsForm(); options.Save(); BindHotKey(); SetTime(); ResetButton.Focus(); }
public void StartButton() { NextButton.SetActive(true); PreviousButton.SetActive(true); ResetButton.SetActive(true); StartLevels.SetActive(false); string newLevel = levelPrefix + (++currentLevel); SceneManager.LoadScene(newLevel); }
// Start is called before the first frame update void Start() { player = GameObject.FindWithTag("Player").GetComponent <Player>(); girl = GameObject.FindWithTag("Girl").GetComponent <Girl>(); enemy = GameObject.FindWithTag("Enemy1").GetComponent <Enemy1>(); fade = GameObject.FindWithTag("Fade").GetComponent <Fade>(); scene = GetComponent <Scene>(); reset = GameObject.FindWithTag("Button").GetComponent <ResetButton>(); fade.isFadeOut = true; }
public override void OnInspectorGUI() { base.OnInspectorGUI(); ResetButton myTarget = (ResetButton)target; if (GUILayout.Button("Reset")) { myTarget.resettable.ResetNow(); } }
// Reseter programmet som det var ved opstart private void ResetButton_Click(object sender, EventArgs e) { Runners.Clear(); player.Second = 0; PlayTimer.Stop(); Map1.Refresh(); ResetButton.Hide(); LoadButton.Show(); player.ShutDown(); RunnersCheckBox.Items.Clear(); }
private void TimeLabel_Click(object sender, EventArgs e) { if (simplified) { StartButton_Click(sender, e); } else { ShowOptions(); } ResetButton.Focus(); }
void Awoke() { if (instance != null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
private void MenuButton_Click(object sender, EventArgs e) { TimeLabel.Hide(); NextButton.Hide(); AddQuestionButton.Show(); StartButton.Show(); ResetButton.Hide(); IDLabel.Show(); IDTextField.Show(); DeleteAnswersButton.Hide(); Timp.Stop(); }
//set this as Singleton void Awake() { if (instance == null) { DontDestroyOnLoad(this); instance = this; } else if (instance != this) { Destroy(gameObject); } }
/*public void Awake() * { * transform.localPosition = new Vector3(0, 0, 0); * * transform.GetComponent<Image>().enabled = false; * * LVM = GameObject.FindGameObjectWithTag("LevelManager").GetComponent<LevelManager>(); * Controls = GameObject.FindGameObjectWithTag("Controls"); * }*/ public override void ResetLevel() { base.ResetLevel(); transform.Find("ChargeSelector").GetComponent <ChargeSelectorManager>().Reset(); transform.parent.parent.GetComponent <resize>().InitResize(transform); BtnValidate.SetActive(true); Selector.ValidateChoice(false); Selector.Reset(); ResetButton.SetActive(false); Controls.SetActive(false); }
void ResetButtonPress() { Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform); ResetButton.AddInteractionPunch(); if (solved) { return; } ResetModule(); DebugLog("Reset button pressed, vessel contents cleared."); }
public void hideWinBox() { LoadingScreenUI.SetActive(true); clearLevel(); winBoxUI.SetActive(false); mainMenuPanel.SetActive(true); levelButtons[levelUnlock].SetActive(true); ResetButton.SetActive(false); ResetLevel(); LoadingScreenUI.SetActive(false); }
private void ShowAnswers() { Answer1.BackColor = Color.Turquoise; Answer2.BackColor = Color.Turquoise; Answer3.BackColor = Color.Turquoise; Answer4.BackColor = Color.Turquoise; ResetButton.Focus(); TotalGames++; TimePlayed += TimeSpan.FromSeconds(Timer.GetCurrentSecondsElapsed()); GameInProgress = false; contextMenuStrip1.Items[0].Text = "Total Games Played: " + TotalGames; contextMenuStrip1.Items[1].Text = "Total Time Played: " + TimePlayed; contextMenuStrip1.Items[2].Text = "Average: " + TimePlayed.TotalSeconds / TotalGames; double secondsPlayed = (TimePlayed - LastTimePlayed).TotalSeconds; LastTimePlayed = TimePlayed; TimeLabel.Text = "Time: " + secondsPlayed.ToString("F2"); TimeLabel.Visible = true; AverageLabel.Text = "Avg: " + (TimePlayed.TotalSeconds / TotalGames).ToString("F2"); AverageLabel.Visible = true; var answersKey = GetAnswersAsInt(Game.Answers); if (!Records.ContainsKey(answersKey)) { Records.Add(answersKey, new GameRecord(new List <double>() { secondsPlayed })); } else { FastLabel.Text = "Fast: " + Records[answersKey].Fastest.ToString("F2"); SlowLabel.Text = "Slow: " + Records[answersKey].Slowest.ToString("F2"); FastLabel.Visible = true; if (Records[answersKey].Fastest != Records[answersKey].Slowest) { SlowLabel.Visible = true; } Records[answersKey].AddTime(secondsPlayed); } }
private void Form1_KeyUp(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.D1: drop[0].PerformClick(); break; case Keys.D2: drop[1].PerformClick(); break; case Keys.D3: drop[2].PerformClick(); break; case Keys.D4: drop[3].PerformClick(); break; case Keys.D5: drop[4].PerformClick(); break; case Keys.D6: drop[5].PerformClick(); break; case Keys.D7: drop[6].PerformClick(); break; case Keys.N: ResetButton.PerformClick(); break; case Keys.D8: checkBox1.Checked = !checkBox1.Checked; break; case Keys.D9: checkBox4.Checked = !checkBox4.Checked; break; default: break; } }
public void gunShot() { timer = effectDelay; enableEffects(); gunLine.SetPosition(0, transform.position); Ray shot = new Ray(); RaycastHit rayInfo; shot.origin = transform.position; shot.direction = transform.forward; Debug.Log("Gunshot"); if (Physics.Raycast(shot, out rayInfo, maxDistance)) { EnemyController target = rayInfo.collider.GetComponent <EnemyController>(); if (target != null) { target.takeDamage(); } else if (rayInfo.collider.tag == "Button") { ResetButton button1 = rayInfo.collider.GetComponent <ResetButton>(); if (button1 != null) { button1.OnClick(); } else { KeyboardButton key = rayInfo.collider.GetComponent <KeyboardButton>(); if (key != null) { key.OnClick(); } } } gunLine.SetPosition(1, rayInfo.point); } else { gunLine.SetPosition(1, shot.origin + shot.direction * maxDistance); } }
internal void FocusButton(ButtonType type) { switch (type) { case ButtonType.Ok: OkButton.Focus(); break; case ButtonType.Cancel: CancelButton.Focus(); break; case ButtonType.Reset: ResetButton.Focus(); break; } }
void ReleaseDesignerOutlets() { if (AnswerButton != null) { AnswerButton.Dispose(); AnswerButton = null; } if (PictureButton != null) { PictureButton.Dispose(); PictureButton = null; } if (QuestionLable != null) { QuestionLable.Dispose(); QuestionLable = null; } if (QuestionTextView != null) { QuestionTextView.Dispose(); QuestionTextView = null; } if (ResetButton != null) { ResetButton.Dispose(); ResetButton = null; } if (RoundLabel != null) { RoundLabel.Dispose(); RoundLabel = null; } if (ScoreLabel != null) { ScoreLabel.Dispose(); ScoreLabel = null; } }
void ReleaseDesignerOutlets() { if (AddButton != null) { AddButton.Dispose(); AddButton = null; } if (AddProduct != null) { AddProduct.Dispose(); AddProduct = null; } if (ResetButton != null) { ResetButton.Dispose(); ResetButton = null; } if (ShuffleSwitch != null) { ShuffleSwitch.Dispose(); ShuffleSwitch = null; } if (ViewTouched != null) { ViewTouched.Dispose(); ViewTouched = null; } if (AddLabel != null) { AddLabel.Dispose(); AddLabel = null; } if (AddDescription != null) { AddDescription.Dispose(); AddDescription = null; } }
protected void Start() { var gs = Game.Instance.GameState; if (gs != null) { started = true; guiprovider = new GUIProvider(gs.Data); SaveButton.SetActive(gs.Data.isShowSaveLoad()); LoadButton.SetActive(gs.Data.isShowSaveLoad()); ResetButton.SetActive(gs.Data.isShowReset()); if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { this.GetComponent <UnityEngine.UI.CanvasScaler>().referenceResolution = new Vector2(600, 400); } } }
public override void OnToolGUI(Event e) { var uiView = UIView.GetAView(); var screenPos = uiView.WorldPointToGUI(Camera.main, Centre) * uiView.inputScale; TurnLeftButton.Update(screenPos); FlipButton.Update(screenPos); TurnRightButton.Update(screenPos); ApplyButton.Update(screenPos); NotApplyButton.Update(screenPos); ResetButton.Update(screenPos); TurnLeftButton.OnGUI(e); FlipButton.OnGUI(e); TurnRightButton.OnGUI(e); ApplyButton.OnGUI(e); NotApplyButton.OnGUI(e); ResetButton.OnGUI(e); }
protected void Start() { var gs = Game.Instance.GameState; if (gs != null) { started = true; guiprovider = new GUIProvider(gs.Data); SaveButton.SetActive(gs.Data.isShowSaveLoad()); LoadButton.SetActive(gs.Data.isShowSaveLoad()); ResetButton.SetActive(gs.Data.isShowReset()); if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { this.GetComponent <UnityEngine.UI.CanvasScaler>().referenceResolution = new Vector2(600, 400); } /*Game.Instance.OnShowText += (finished, line, text, x, y, textColor, textOutlineColor, baseColor, outlineColor, id) => * { * if (!finished) * { * if (line != null) * { * Talk(line); * } * else if (textColor == Game.NoColor && textOutlineColor == Game.NoColor) * { * Talk(text, x, y, Color.white, Color.black); * } * else if(baseColor == Game.NoColor && outlineColor == Game.NoColor) * { * Talk(text, x, y, textColor, textOutlineColor); * } * else * { * Talk(text, x, y, textColor, textOutlineColor, baseColor, outlineColor); * } * } * };*/ } }
//Environment Constructor public AngryBallsEnvironment() { //Instantiate the Buttons gameState = GameState.initialize; playPauseButton = new PlayPauseButton(gameState); resetButton = new ResetButton(gameState); builderButton = new BuilderButton(gameState); saveButton = new SaveButton(gameState); loadButton = new LoadButton(gameState); // Instantiate Dialog Box dialog = new Dialog(loadButton, saveButton); //Instantiate Start Positions for environment items clawopenPosition = clawStartPosition; ballStartPose = new Vector2(clawStartPosition.X + 47, clawStartPosition.Y + 150); //Instantiate local images background = Game1.environmentBackground; border = Game1.borderImage; bigCogImage = Game1.bigCog; bigCogOrigin = new Vector2(bigCogImage.Width / 2, bigCogImage.Height / 2); springImage = Game1.springImage; chickenImage = Game1.chickenImage; clawOpen = Game1.clawOpen; //Instantiate environment containers Input = new InputManager(); map = new Map(); toolBox = new ToolBox(); }