private void ShowPause() { if (Input.GetKeyDown(KeyCode.LeftControl)) { Pauser.Pause(); } }
// Update is called once per frame void Update() { if (GameManager.Instance.m_PlayMode != PlayMode.NoPlay) { if (Input.GetButtonDown("Pause")) { bool isPause = Pauser.s_TargetByTag[PauseTag.Pause].m_IsPause; if (!isPause) { Pauser.Pause(); GameManager.Instance.m_GameStarter.AddScene("Pause"); } // else // { //Pauser.Resume(); //GameManager.Instance.m_GameStarter.RemoveScene("Pause"); // } } } if (Input.GetKeyDown(KeyCode.L)) { bool isPause = Pauser.s_TargetByTag[PauseTag.Enemy].m_IsPause; if (!isPause) { Pauser.Pause(PauseTag.Enemy); } else { Pauser.Resume(PauseTag.Enemy); } } }
// Update is called once per frame void Update() { if (Input.GetButtonDown("Submit")) { if (!isPause) { Pauser.Pause(); FadeManager.Instance.Pause(); isPause = true; isFreeze = true; } else { Pauser.Resume(); FadeManager.Instance.Resume(); isPause = false; isFreeze = false; } } if (!onceFlag) { StartCoroutine(Starting()); onceFlag = true; } if (isClear) { StartCoroutine(Clearing()); } }
/// <summary> /// ポーズ処理 /// </summary> private void Pause() { // ポーズするキーが押されたらポーズ if (Input.GetKeyDown(KeyCode.Escape)) //if (Input.GetKeyDown(KeyCode.Joystick1Button7)) { // ポーズしてなければポーズする if (!isPause) { // ポーズ中にする isPause = true; // ウィジェットを有効にする InitializeWidgetEnable(true); // 現在のメニューインデックスを初期化 currentMenuIndex = 0; // メニューウィジェットの初期化 InitializePauseMenuWidgetByCurrentIndex(); // ポーズ直前のタイムスケールを保存 prevTimeScale = Time.timeScale; // タイムスケールを0にする // // ここでタイムスケールの影響を受けるゲームオブジェクトは停止する //Time.timeScale = 0; // ポーズ Pauser.Pause(); } } }
private void ToGo() { isPause = true; Pauser.Pause(); Vector3 targetEulerAngles = new Vector3(90.0f, 0.0f, 0.0f); if (tabletMoveState == TabletMoveState.before && Application.loadedLevelName != Scenes.EndScene.name) { tabletPC = Instantiate(tabletPCPrefab, tabletTransform.position, tabletTransform.rotation) as GameObject; tabletPC.transform.parent = tabletTransform; StartCoroutine(TabletMovement(tabletPCAxis, targetEulerAngles, true)); player.ShowMiniMap(false); ExamineIconManager.SetVisible(false); } if (tabletMoveState == TabletMoveState.after) { pauseState = PauseState.Run; tabletMoveState = TabletMoveState.before; Cursor.visible = true; Cursor.lockState = CursorLockMode.None; } }
/// <summary> /// トリガー検知 /// </summary> public void OnTriggerEnter(Collider col) { // タグ別に処理 string tag = col.transform.tag; switch (tag) { // プレイヤー case "Player": if (-1 == m_iCurrentSpeachIndex) { // 現在のセリフのインデックスを最初に合わせる m_iCurrentSpeachIndex = 0; col.GetComponent <AnimatorController>().AnimationChange(0); Pauser.Pause(); } break; } }
public void OnClick() { pauser.Pause(false); SceneManager.LoadScene("Questions_End", LoadSceneMode.Single); //Debug.Log ("Application Quit"); //Application.Quit (); }
// Use this for initialization void Start() { if (m_isAwake) { Run(); } Pauser.Pause(); }
public void ShowMenu(string panel) { if (!menuIsActive) { transform.Find(panel).gameObject.SetActive(true); menuIsActive = true; pauser.Pause(); } }
void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Pauser.Pause(); } //else //{ // Pauser.Resume(); //} }
public void GotoTitle() { pauseUI.SetActive(false); gotoTitleCheckPanel.SetActive(false); Time.timeScale = 1f; // Title画面へ FadeManager.Instance.LoadScene("TitleScene", 0.5f); SoundManager.Instance.StopSe(); SoundManager.Instance.PlaySeByName("OK"); Pauser.Pause(); }
private async UniTaskVoid CutInAsync() { Pauser.Pause(); cutIn.SetActive(true); await UniTask.Delay(cutInTimeMs); cutIn.SetActive(false); Pauser.Resume(); bgmPlayer.Play(soundDatabase.BuffBgm); DecreasePoint(); }
public void Restart() { pauseUI.SetActive(false); restartCheckPanel.SetActive(false); Time.timeScale = 1f; // Sceneの読み直し FadeManager.Instance.LoadScene(SceneManager.GetActiveScene().name, 0.5f); SoundManager.Instance.StopSe(); SoundManager.Instance.PlaySeByName("OK"); Pauser.Pause(); }
private void HideMessage() { if (onPrompt != null) { onPrompt(false, Message); } if (invokePause) { Pauser.Pause(false); } }
public void ToggleInventory() { if (!inventoryOpen) { pauser.Pause(); } else { pauser.Unpause(); } inventoryCanvas.GetComponent <Canvas>().enabled = !inventoryOpen; inventoryOpen = !inventoryOpen; }
public void OpenPausePanel() { if (pc.IsEvent) { return; } _pauseMenu.SetActive(true); panel.enabled = true; Time.timeScale = 0; pc.enabled = false; Pauser.Pause(); SoundManagerV2.Instance.PlaySE(24); }
private IEnumerator FinalShot() { Pauser.Pause(); SoundManager.Instance.PlaySeByName("hero1"); yield return(new WaitForSeconds(1.6f)); //ここにアニメーター再生の処理を書く Pauser.Resume(); SoundManager.Instance.PlaySeByName("beamgun1"); GameObject instantTeslaEnergySoul = Instantiate(_teslaEnergySoul, transform.position, Quaternion.identity) as GameObject; instantTeslaEnergySoul.GetComponent <EnergySoulScript>().SetParameter(true, _teslaUltraChargeColor, 100); }
private void ShowMessage() { if (invokePause) { Pauser.Pause(true); } GetComponent <Collider2D>().enabled = false; if (onPrompt != null) { onPrompt(true, Message); } }
public void OnClick() { //store play was clicked //Analytics.LogCritical ("Score at end of level 1", "10242"); rewardInfoSetup.StoreMotivationData(2); motivationJson = storeMotivationData.GetJsonString(); Analytics.LogCritical("JsonTest", motivationJson); Debug.Log(motivationJson); pause.Pause(false); levelStart.SetActive(false); noRewardsPopup.SetActive(false); }
public void UpdateLines(string fileName) { var scenarioText = Resources.Load <TextAsset> ("Scenario/" + fileName); if (scenarioText == null) { Debug.LogError("シナリオファイルが見つからない"); enabled = false; return; } Pauser.Pause(); scenarios = scenarioText.text.Split(new string[] { "@br" }, System.StringSplitOptions.None); currentLine = 0; //Debug.Log ("UpdateLines" + currentLine); Resources.UnloadAsset(scenarioText); }
// Update is called once per frame void Update() { if (Input.GetKeyDown("p") || Input.GetButtonDown("Action1")) { if (pausepanel.active == false) { pausepanel.active = true; Pauser.Pause(); } else { pausepanel.active = false; Pauser.Resume(); } } }
public IEnumerator UseHeroSkill(GameSide gameSide) { GameManager.instance.UseSkillCount(gameSide); // オブジェクトを停止する。 Pauser.Pause(); // GUIを作成する。 GameObject gameObject = Instantiate(animationPrefub, canvasTransform, false); HeroSkillAnimationController animation = gameObject.GetComponent <HeroSkillAnimationController>(); StartCoroutine(animation.Animate()); yield return(new WaitForSeconds(HeroSkillAnimationController.ANIMATION_TIME)); Destroy(gameObject); // オブジェクトの停止を解除する。 Pauser.Resume(); }
private void Update() { if (GameOver) { return; } if (LeftDefaultTarget == null || RightDefaultTarget == null) { return; } if (LeftDefaultTarget.GetComponent <Health>().Dead || RightDefaultTarget.GetComponent <Health>().Dead) { GameOver = true; PresentAwards(); Pauser.Pause(true); } }
// Update is called once per frame void Update() { if (Input.GetButtonUp(InputConstants.INV_AXIS)) { if (!Pauser.IsPaused) { Pauser.Pause(this); TabMenu.SetActive(true); } else { // Only close the menu and unpause if this menu is the only thing causing the game to pause. if (Pauser.PauseLocks.Count == 1 && Pauser.PauseLocks.Contains(this)) { Pauser.Unpause(this); TabMenu.SetActive(false); } } } }
public void OnClick() { if (Time.timeScale == 1) { quitScreenInfo = "ingame"; } else { quitScreenInfo = "level screen"; } pauser.Pause(false); Analytics.LogCritical("Quit", quitScreenInfo); Debug.Log("Quit"); Debug.Log(quitScreenInfo); SceneManager.LoadScene("Questions_End", LoadSceneMode.Single); //Debug.Log ("Application Quit"); //Application.Quit (); }
//メニュー表示の切り替え public void SwitchDisplay() { _isDisplayed = !_isDisplayed; if (_isDisplayed) { Vector3 d = vrCamEye.transform.forward; d.y = 0.0f; d.Normalize(); MenuSetActive(true); transform.position = vrCamEye.transform.position + d * offset; transform.rotation = vrCamEye.transform.rotation; transform.LookAt(vrCamEye.transform); Pauser.Pause(); } else { MenuSetActive(false); Pauser.Resume(); } }
private void Restart() { drawMenu = false; drawLineManager = false; selectedSlot = -1; for (int i = 0; i < scores.LeftBuildingSlots; i++) { if (scores.leftBuildings[i] != null) { Destroy(scores.leftBuildings[i].gameObject); } } for (int i = 0; i < scores.RightBuildingSlots; i++) { if (scores.rightBuildings[i] != null) { Destroy(scores.rightBuildings[i].gameObject); } } foreach (var unit in FindObjectsOfType <Unit>()) { unit.DestroyUnit(); } foreach (var castle in FindObjectsOfType <Castle>()) { castle.Restart(); } scores.LeftManaCount = scores.RightManaCount = Scores.ManaCount; scores.LeftScorePoints = scores.RightScorePoints = 0; scores.GameOver = false; Pauser.Pause(false); }
void Result() { Pauser.Pause(); state = State.Result; if (PlayerPrefs.GetInt("HighScorePoint") < score) { PlayerPrefs.SetInt("HighScorePoint", score); } grazePoint = graze.Grazer() * 10; if (0 < player.Life()) { clearPoint = 5000; } playerPoint = player.Life() * 1000; bombPoint = player.count * 1000; totalPoint = score + grazePoint + clearPoint + playerPoint + bombPoint; if (highTotalPoint < totalPoint) { highTotalPoint = totalPoint; } if (PlayerPrefs.GetInt("HighTotalPoint") < totalPoint) { PlayerPrefs.SetInt("HighTotalPoint", totalPoint); } resultPanel.gameObject.SetActive(true); resultScore.text = "" + score; resultClear.text = "" + clearPoint; resultGraze.text = "" + grazePoint; resultPlayer.text = "" + playerPoint; resultBomb.text = "" + bombPoint; resultTotal.text = "" + totalPoint; resultHighTotal.text = "" + highTotalPoint; }
public void Pause()//ポーズ { isPause = true; pauseUI.SetActive(true); Pauser.Pause(); }
// Use this for initialization void Start() { pauser.Pause(true); }