public void PlayTraj() { PlayButton.SetActive(false); PauseButton.SetActive(true); FrameSlider.maxValue = framenum - 1; FrameSlider.minValue = 0; SpeedSlider.maxValue = 100; SpeedSlider.minValue = 0; SpeedSlider.value = 25; //FrameSlider.GetComponent<SliderGestureControl>().SetSpan(0, framenum - 1); //SpeedSlider.GetComponent<SliderGestureControl>().SetSpan(0, 100); //SpeedSlider.GetComponent<SliderGestureControl>().SetSliderValue(25);s //Time.timeScale = 1; //GameObject.Find("PlayButton").AddComponent<PlayButton2>(); // gets the total number of frames from Load //framenum = Manager.GetComponent<Load>().framenum; StartCoroutine("Traj"); }
private void Start() { isMuted = MusicHandler.Instance._audioSource.mute; if (_muteButton) { ChangeButtonSprite(_muteButton); } if (PlayButton == null) { return; } if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer ) { PlayButton.SetActive(false); } else { PlayButton.SetActive(true); } }
/* * public void Update() * { * i = Convert.ToInt32(slider.value); * } */ public void StopTraj() { PlayButton.SetActive(true); PauseButton.SetActive(false); StopCoroutine("Traj"); //Time.timeScale = 0;// try not both stopping it and adjusting the timescale }
private void Update() { if (volumeslider.value == -80 && !mute) { PlayButton.SetActive(false); MuteButton.SetActive(true); Audio.mute = true; mute = true; } if (volumeslider.value > -80 && mute) { MuteButton.SetActive(false); PlayButton.SetActive(true); Audio.mute = false; mute = false; } // Check if Back was pressed this frame if (Input.GetKeyDown(KeyCode.Escape)) { if (ModesPage.activeSelf || InfoPanel.activeSelf && !beingHandled) { Camera.GetComponent <CameraController>().SwitchCameraTarget(0); InfoPage(false); ShowModesPage(false); StartCoroutine(HandleIt()); } if (SinglePanel.activeSelf || MultiPanel.activeSelf && !beingHandled) { Camera.GetComponent <CameraController>().SwitchCameraTarget(1); ShowMultiPanel(false); ShowSinglePanel(false); StartCoroutine(HandleIt()); } if (!beingHandled) { if (ConfirmPanel.activeSelf) { ShowConfirm(false); } else { ShowConfirm(true); } } } }
public override void Init() { if (PPTGlobal.PPTEnv != PPTGlobal.PPTEnvironment.PPTPlayer) { ve.aniList.Clear(); } base.Init(); player.Stop(); source.Stop(); loadVideo(); isEnd = false; isPlaying = false; image.enabled = false; isPlayed = false; PlayButton.SetActive(false); isEnterAniDown = false; }
public void TutorialStart() { Time.timeScale = 1; if (PlayButton != null) { PlayButton.SetActive(false); } TutorialButton.SetActive(false); if (ShopButton != null) { ShopButton.SetActive(false); } if (Title != null) { Title.SetActive(false); } tut_1(); }
public void MuteAndPlayMusic(bool mute) { if (mute) { MuteButton.SetActive(true); PlayButton.SetActive(false); premute = volumeslider.value; PlayerPrefs.SetFloat("premute", premute); volumeslider.value = -80; PlayerPrefs.SetInt("MusicActive", 0); } else { MuteButton.SetActive(false); PlayButton.SetActive(true); volumeslider.value = PlayerPrefs.GetFloat("premute", 0); PlayerPrefs.SetInt("MusicActive", 1); } }
public void tut_over() { tutorial_5.SetActive(false); PowerUpsContinue.SetActive(false); if (PlayButton != null) { PlayButton.SetActive(true); } TutorialButton.SetActive(true); if (ShopButton != null) { ShopButton.SetActive(true); } if (Title != null) { Title.SetActive(true); } Time.timeScale = 0; }
public void PlayerDeadDisplayButtons() { StartCoroutine(DeadDelay()); playButton.SetActive(Button.ButtonActive.Disabled); restartButton.SetActive(Button.ButtonActive.Enabled); }