// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); GameOverText.SetActive(false); RestartButton.SetActive(false); }
private void Start() { playButton = new PlayButton(playBtnObj); restartButton = new RestartButton(restartBtnObj); restartButton.SetActive(Button.ButtonActive.Disabled); Time.timeScale = 0; }
// Use this for initialization void Start() { GameOverText.SetActive(false); RestartButton.SetActive(false); rig = GetComponent <Rigidbody2D>(); }
/// <summary> /// Jukebox controls /// </summary> private void HandleJukeboxInput() { if (DialogManager.Dialogs.Count != 0) { return; } if (KeyboardManager.IsUniqueKeyPress(Keys.Z)) { PreviousButton.FireButtonClickEvent(); } if (KeyboardManager.IsUniqueKeyPress(Keys.X)) { RestartButton.FireButtonClickEvent(); NotificationManager.Show(NotificationLevel.Info, "Restarted track"); } if (KeyboardManager.IsUniqueKeyPress(Keys.C)) { var isPaused = AudioEngine.Track.IsPaused; PauseResumeButton.FireButtonClickEvent(); NotificationManager.Show(NotificationLevel.Info, isPaused ? "Resumed track" : "Paused track"); } if (KeyboardManager.IsUniqueKeyPress(Keys.V)) { NextButton.FireButtonClickEvent(); } }
void Update() { ScoreLeft.text = "" + scoreLeft; ScoreRight.text = "" + scoreRight; //ScoreLeft.text = ""+ scoreLeft; //ScoreLeft Metnini güncel skor ile güncelle //ScoreRight.text = "" + scoreRight; //ScoreRight Metnini güncel skor ile güncelle if (scoreLeft == 10 || scoreRight == 10) { Time.timeScale = 0f; RestartButton.SetActive(true); ExitButton.SetActive(true); DeveloperText.SetActive(true); LoserText.SetActive(true); if (scoreRight == 10) { loserText.text = "Loser: Left Side"; } else if (scoreLeft == 10) { loserText.text = "Loser: Right Side"; } } if (Input.GetKeyDown(KeyCode.Escape)) { Time.timeScale = 0f; //Oyun duraklatıldı ResumeButton.SetActive(true); ExitButton.SetActive(true); RestartButton.SetActive(true); } }
public void OnClickResumeButton() { Time.timeScale = 1f; //Oyun devam ediyor ResumeButton.SetActive(false); RestartButton.SetActive(false); ExitButton.SetActive(false); }
public void SetStatus(ActionState state) { CurrentActionState = state; if (state == ActionState.GameOver) { RestartButton.Show(); } }
// Use this for initialization void Start() { RestartButton.SetActive(false); PauseButton.SetActive(false); NextLevelButton.onClick.AddListener(startNextLevel); hide(nextLevelImage); Input.multiTouchEnabled = true; }
protected override void MouseCore(MouseHandlerParams _params) { RestartButton.Mouse(_params); LevelSelectButton.Mouse(_params); MainMenuButton.Mouse(_params); ExitButton?.Mouse(_params); BackButton.Mouse(_params); }
public void GameOver() { ChangeState("You Loose!"); StopGame(); RestartButton.SetActive(true); MenuButton.SetActive(true); LevelManager.LevelWon = false; }
protected override void TouchCore(ref TouchHandlerParams _params) { RestartButton.Touch(ref _params); LevelSelectButton.Touch(ref _params); MainMenuButton.Touch(ref _params); ExitButton?.Touch(ref _params); BackButton.Touch(ref _params); }
void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag.Equals("enemy")) { GameOverText.SetActive(true); RestartButton.SetActive(true); Destroy(this.gameObject); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag.Equals("enemy")) { GameOverText.SetActive(true); RestartButton.SetActive(true); gameObject.SetActive(false); } }
void CpuLose() { main.text = "You have defeated me ! I will get you next time... "; NextButton.SetActive(false); CorrectButton.SetActive(false); RestartButton.SetActive(true); HigherButton.SetActive(false); LowerButton.SetActive(false); }
public void is_Correct() { win = true; main.text = "I Guess the Number is : " + guess; HigherButton.SetActive(false); LowerButton.SetActive(false); CorrectButton.SetActive(false); RestartButton.SetActive(true); }
// Use this for initialization void Start() { NodeGenerationScript = NodeGeneratorObject.GetComponent<NodeGeneration>(); RangeCircleScript = RangeCircleObject.GetComponent<RangeCircle>(); PlayerScript = PlayerObject.GetComponent<Player>(); ScoreCounterScript = ScoreCounterObject.GetComponent<ScoreCounter>(); RestartButtonScript = RestartButtonObject.GetComponent<RestartButton>(); NeuronLineScript = NeuronLineObject.GetComponent<NeuronLine>(); }
public CrashDialog(Exception ex) { InitializeComponent(); RestartButton.Focus(FocusState.Programmatic); MoreInfo.Text = ex.Message; ProgressRing.Visibility = Visibility.Collapsed; }
public void reStart() { GameObject[] Enemy = GameObject.FindGameObjectsWithTag("Enemy"); for (int i = 0; i < Enemy.Length; i++) { Destroy(Enemy[i]); } GameOverImage.SetActive(false); RestartButton.SetActive(false); }
void Welcome() { main.text = "Pick a Number! Lowest Number is : " + min + " Highest Number is : " + max; NextButton.SetActive(true); CorrectButton.SetActive(false); RestartButton.SetActive(false); HigherButton.SetActive(false); LowerButton.SetActive(false); attempts = 5; }
// Start is called before the first frame update void Start() { //giving player full lives at start of the game health = 3; heart1.SetActive(true); heart2.SetActive(true); heart3.SetActive(true); gameOver.SetActive(false); playerWin.SetActive(false); RestartButton.SetActive(false); }
void Awake() { //menuAudio = GetComponent<AudioSource>(); restartTimer = menuTimer; status_text = StatusText.GetComponent <Text>(); pauseLoader = PauseButton.GetComponent <Transform>().FindChild("pause_Loader").GetComponent <Image>(); playLoader = PlayButton.GetComponent <Transform>().FindChild("play_Loader").GetComponent <Image>(); restartLoader = RestartButton.GetComponent <Transform>().FindChild("restart_Loader").GetComponent <Image>(); homeLoaderPM = HomeButtonPM.GetComponent <Transform>().FindChild("home_Loader").GetComponent <Image>(); homeLoaderGO = HomeButtonGO.GetComponent <Transform>().FindChild("home_Loader").GetComponent <Image>(); }
void Start() { Assert.IsNotNull(landButton); Assert.IsNotNull(restartButton); Assert.IsNotNull(leaveButton); sLeaveButton = leaveButton.GetComponent <LeaveButton>(); sRestartButton = restartButton.GetComponent <RestartButton>(); sLandButton = landButton.GetComponent <LandButton>(); mainMenuOn = false; showAllMainMenuElements(false); }
void Start() { helicopter = GameObject.FindWithTag("Player"); RestartButton.SetActive(false); StoreButton.SetActive(false); AdButton.SetActive(false); text = GetComponent <Text>(); text.color = new Color(0, 0, 0, 0); }
public void SetDisable() { helicopter = GameObject.FindWithTag("Player"); if (helicopter != null) { RestartButton.SetActive(false); StoreButton.SetActive(false); AdButton.SetActive(false); text.color = new Color(0, 0, 0, 0); } }
public void UpdateGuess() { if (attempts != 0) { main.text = "Is it ? " + guess + " Or click higher or lower ?"; NextButton.SetActive(false); RestartButton.SetActive(false); CorrectButton.SetActive(true); HigherButton.SetActive(true); LowerButton.SetActive(true); } }
public void gameEnd() { StartButton.SetActive(false); RestartButton.SetActive(true); QuitButton.SetActive(true); gameActiveState = false; PauseButton.SetActive(false); if (((int)(GameObject.FindWithTag("Player").transform.position.z - 18) / 10) >= boundaryScore) { show(nextLevelImage); } }
private void RestartButton_Click_1(object sender, EventArgs e) { resetSeenJokes(); RestartButton.Hide(); JokeResult.Show(); Notification.Text = ""; JokeResult.Text = "Prepare for LULZ."; JokeButton.Show(); Like.Show(); Dislike.Show(); Settings.Default.CurrentJoke = 0; Settings.Default.Save(); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } CanvasState.SetActive(false); RestartButton.SetActive(false); MenuButton.SetActive(false); }
// Update is called once per frame void Update() { if (health > 4) { health = 3; } //what to do when each life is lost switch (health) { //special case when player wins case 4: PauseButton.SetActive(false); playerWin.SetActive(true); RestartButton.SetActive(true); Time.timeScale = 0; break; case 3: heart1.SetActive(true); heart2.SetActive(true); heart3.SetActive(true); break; case 2: heart1.SetActive(true); heart2.SetActive(true); heart3.SetActive(false); break; case 1: heart1.SetActive(true); heart2.SetActive(false); heart3.SetActive(false); break; //game over case 0: heart1.SetActive(false); heart2.SetActive(false); heart3.SetActive(false); PauseButton.SetActive(false); gameOver.SetActive(true); RestartButton.SetActive(true); Time.timeScale = 0; break; } }
/* * * * */ private void OnTriggerEnter2D(Collider2D collision) { Debug.Log("Death"); RestartButton.Show(); //GetComponentInChildren<ParticleSystem>().Play(); death_particle.Play(); StopToEnemy(); StopToPlayer(); //Time.timeScale = 0f; GetComponent <AudioSource>().Play(); GameObject.Find("BGM").GetComponent <AudioSource>().Stop(); }
/// <summary> /// Destroys a life. /// </summary> public void DestroyTheLife() { if (Controller.GameActive) { StartCoroutine(UpdateTheHealthUi(Controller.Lifes)); Controller.Lifes--; if (Controller.Lifes <= 0) { GameObject.Find("Canvas/EndUi").GetComponent <Animator>().Play("EndUi"); RestartButton.EnableTheButton(); SetBest(); Controller.GameActive = false; } } }
void ShareButtonCallback() { if (!introDone) return; pressedButton = RestartButton.share; Outro(); }
void RestartButtonCallback() { if (!introDone) return; //Debug.Log("restart pressed"); pressedButton = RestartButton.restart; Outro(); }
void VideoButtonCallback() { if (!introDone) return; pressedButton = RestartButton.video; Outro(); }