Ejemplo n.º 1
0
 private void ShowPause()
 {
     if (Input.GetKeyDown(KeyCode.LeftControl))
     {
         Pauser.Pause();
     }
 }
Ejemplo n.º 2
0
    // 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);
            }
        }
    }
Ejemplo n.º 3
0
    // 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();
            }
        }
    }
Ejemplo n.º 5
0
    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;
        }
    }
Ejemplo n.º 6
0
    /// <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;
        }
    }
Ejemplo n.º 7
0
    public void OnClick()
    {
        pauser.Pause(false);
        SceneManager.LoadScene("Questions_End", LoadSceneMode.Single);

        //Debug.Log ("Application Quit");
        //Application.Quit ();
    }
Ejemplo n.º 8
0
    // Use this for initialization
    void Start()
    {
        if (m_isAwake)
        {
            Run();
        }

        Pauser.Pause();
    }
Ejemplo n.º 9
0
 public void ShowMenu(string panel)
 {
     if (!menuIsActive)
     {
         transform.Find(panel).gameObject.SetActive(true);
         menuIsActive = true;
         pauser.Pause();
     }
 }
Ejemplo n.º 10
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         Pauser.Pause();
     }
     //else
     //{
     //    Pauser.Resume();
     //}
 }
Ejemplo n.º 11
0
 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();
 }
Ejemplo n.º 12
0
        private async UniTaskVoid CutInAsync()
        {
            Pauser.Pause();
            cutIn.SetActive(true);
            await UniTask.Delay(cutInTimeMs);

            cutIn.SetActive(false);
            Pauser.Resume();
            bgmPlayer.Play(soundDatabase.BuffBgm);
            DecreasePoint();
        }
Ejemplo n.º 13
0
 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();
 }
Ejemplo n.º 14
0
    private void HideMessage()
    {
        if (onPrompt != null)
        {
            onPrompt(false, Message);
        }

        if (invokePause)
        {
            Pauser.Pause(false);
        }
    }
Ejemplo n.º 15
0
 public void ToggleInventory()
 {
     if (!inventoryOpen)
     {
         pauser.Pause();
     }
     else
     {
         pauser.Unpause();
     }
     inventoryCanvas.GetComponent <Canvas>().enabled = !inventoryOpen;
     inventoryOpen = !inventoryOpen;
 }
Ejemplo n.º 16
0
 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);
 }
Ejemplo n.º 17
0
    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);
    }
Ejemplo n.º 18
0
    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);
    }
Ejemplo n.º 20
0
    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);
    }
Ejemplo n.º 21
0
 // 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();
         }
     }
 }
Ejemplo n.º 22
0
    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();
    }
Ejemplo n.º 23
0
    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);
        }
    }
Ejemplo n.º 24
0
 // 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);
             }
         }
     }
 }
Ejemplo n.º 25
0
    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 ();
    }
Ejemplo n.º 26
0
Archivo: Menu.cs Proyecto: ACK8/Zombie
    //メニュー表示の切り替え
    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();
        }
    }
Ejemplo n.º 27
0
    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);
    }
Ejemplo n.º 28
0
    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;
    }
Ejemplo n.º 29
0
 public void Pause()//ポーズ
 {
     isPause = true;
     pauseUI.SetActive(true);
     Pauser.Pause();
 }
Ejemplo n.º 30
0
 // Use this for initialization
 void Start()
 {
     pauser.Pause(true);
 }