// Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Submit"))
     {
         SceneManager.LoadScene("Title");
         CrossSceneAudioPlayer.PlaySE(systemSE);
     }
 }
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Submit"))
     {
         SceneManager.LoadScene("Title");
         // GetComponent<AudioSource>().Play();
         CrossSceneAudioPlayer.PlaySE(GetComponent <AudioSource>().clip);
     }
 }
    void Update()
    {
        if (Input.GetButtonDown("Submit"))
        {
            if (!StageSelectManager.Instance.clearedStageProgress[StageSelectUIControl.Instance.SelectedStage - 1])
            {
                SetStageIndexAndPath();
                StageSelectManager.Instance.SwitchSubScene("Game");
            }

            CrossSceneAudioPlayer.PlaySE(SystemSE);
        }
    }
Exemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Submit"))
     {
         CrossSceneAudioPlayer.PlaySE(GetComponent <AudioSource>().clip);
         if (count == 0)
         {
             TutorialSpriteRenderer.sprite = tutorial2;
             count++;
         }
         else
         {
             SceneManager.LoadScene("StageSelect");
         }
     }
 }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Submit"))
        {
            SceneManager.LoadScene("tutorial");

            // GetComponent<AudioSource>().Play();
            CrossSceneAudioPlayer.PlaySE(GetComponent <AudioSource>().clip);
        }

        elapsedTime += Time.deltaTime;

        if (elapsedTime > 30.0f)
        {
            SceneManager.LoadScene("DemoPlay");
        }
    }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Submit"))
        {
            SceneManager.LoadScene("Title");

            // GetComponent<AudioSource>().Play();
            CrossSceneAudioPlayer.PlaySE(systemSE);
        }

        elapsedTime += Time.deltaTime;

        if (elapsedTime > 15.0f)
        {
            SceneManager.LoadScene("Title");
        }
    }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Submit"))
        {
            if (HasAllCleared())
            {
                SceneManager.LoadScene("StaffCredit");
            }
            else
            {
                StageSelectManager.Instance.SwitchSubScene("StageSelect");
            }

            // GetComponent<AudioSource>().Play();
            CrossSceneAudioPlayer.PlaySE(GetComponent <AudioSource>().clip);
        }
    }
    /// <summary>
    /// シーンの読み込みが終わったときに呼び出されます。
    /// </summary>
    void Start()
    {
        CrossSceneAudioPlayer.ChangeBGM(mainBGM);

        if (!SceneManager.GetSceneByName("SubGame").isLoaded)
        {
            // SubGame.scene が読み込まれていなければ読み込む
            SceneManager.LoadSceneAsync("SubGame", LoadSceneMode.Additive).completed += op =>
            {
                CSVParser.Instance.RestartEnemyGenerating();
            };
        }
        else
        {
            CSVParser.Instance.RestartEnemyGenerating();
        }
    }
Exemplo n.º 9
0
    /// <summary>
    /// カエルがダメージを負ってからリスタートするまでのコルーチン
    /// </summary>
    /// <returns></returns>
    IEnumerator FrogRestartRoutine()
    {
        // 操作不能にする
        enabled = false;

        CrossSceneAudioPlayer.PlaySE(deathSE);
        CSVParser.Instance.StopEnemyGenerating();
        TimeManager.Instance.StopTimer();
        FrogDeathRecorder.Instance.CaptureRecord();
        ZankiSystem.Instance.DecreaseZanki();

        yield return(new WaitForSeconds(2.0f));

        GameSceneManager.Instance.ReloadScene();

        TimeManager.Instance.ResetTimer();
        TimeManager.Instance.StartTimer();
    }
Exemplo n.º 10
0
    IEnumerator MoveRoutine()
    {
        var InitialPosition = transform.position;
        int count           = 0;

        foreach (var nextLocalPosition in targetLocalPoints)
        {
            var nextRotatedPosition = transform.rotation * nextLocalPosition;
            var nextPosition        = InitialPosition + nextRotatedPosition;

            while (true)
            {
                var timeScaledMoveSpeed = Time.deltaTime * moveSpeed;
                var moveDelta           = nextPosition - transform.position;
                var moveDirection       = moveDelta.normalized;
                var leftDintance        = moveDelta.magnitude;

                if (leftDintance <= timeScaledMoveSpeed)
                {
                    transform.position = nextPosition;
                    count++;
                    break;
                }
                else
                {
                    transform.position += moveDirection * timeScaledMoveSpeed;
                }

                yield return(null);
            }
            if (count == 1)
            {
                // GetComponent<AudioSource>().Play();
                CrossSceneAudioPlayer.PlaySE(GetComponent <AudioSource>().clip);
            }
            else if (count == 2)
            {
                animator.SetTrigger("StartBounce");
            }
            yield return(new WaitForSeconds(waitTimeForAnimation));
        }

        Destroy(gameObject);
    }
Exemplo n.º 11
0
    // Update is called once per frame
    void Update()
    {
        int previousLeftTime = (int)LeftTime;

        elapsedTime += Time.deltaTime;

        if (elapsedTime >= timeLimit && !onTimeOverInvoked)
        {
            onTimeOverInvoked = true;
            CrossSceneAudioPlayer.StopBGM();
            clear.Play();

            CSVParser.Instance.StopEnemyGenerating();
            GameSceneManager.Instance.SwitchScene("Result");
        }

        int currentLeftTime = (int)LeftTime;

        timer.text = currentLeftTime.ToString();
    }
Exemplo n.º 12
0
 public void PlayOneShot(AudioClip clip)
 {
     CrossSceneAudioPlayer.PlaySE(clip);
 }
Exemplo n.º 13
0
 // Start is called before the first frame update
 void Start()
 {
     CrossSceneAudioPlayer.ChangeBGM(mainBGM);
 }
Exemplo n.º 14
0
 // Start is called before the first frame update
 void Start()
 {
     CrossSceneAudioPlayer.ChangeBGM(bgm);
 }
Exemplo n.º 15
0
 public void StopBGM()
 {
     CrossSceneAudioPlayer.StopBGM();
 }
Exemplo n.º 16
0
    public IEnumerator Move()
    {
        //一撃目
        shake = false;
        //ピンセットの初期位置設定
        // Vector3 direction0 = new Vector3(-4f, 22f, 0f);

        Vector3 direction0 = new Vector3(x1, y1, 0f);

        for (int i = 0; i < 5; i++)
        {
            transform.position = Vector3.MoveTowards(transform.position, direction0, speed);
            yield return(null);
        }

        //2秒の待ち
        // yield return new WaitForSeconds(2.0f);

        //初期動作 ピンセットが画面外から画面内に。
        //Vector3 direction1 = new Vector3(-4f, 21f, 0f);
        Vector3 direction1 = new Vector3(x2, y2, 0f);

        for (int i = 0; i < 5; i++)
        {
            if (i == 1)
            {
                // GetComponent<AudioSource>().Play();
                CrossSceneAudioPlayer.PlaySE(PinsetReadySound);
                GetComponent <Animator>().SetTrigger("StartShining");
            }

            transform.position = Vector3.MoveTowards(transform.position, direction1, speed);
            yield return(null);
        }
        //1秒の待ち
        yield return(new WaitForSeconds(1.0f));


        //shakeprogram.GetComponent<Shaker>().Shake();


        //攻撃動作 ピンセットがプレイヤーに接近する
        speed = 4.0f;
        //Vector3 direction2 = new Vector3(-4f, 10f, 0f);
        Vector3 direction2 = new Vector3(x3, y3, 0f);

        for (int i = 0; i < 5; i++)
        {
            transform.position = Vector3.MoveTowards(transform.position, direction2, speed);
            if (i == 1)
            {
                // GetComponent<AudioSource>().Play();
                CrossSceneAudioPlayer.PlaySE(GetComponent <AudioSource>().clip);
            }
            yield return(null);
        }

        //揺らす
        shake = true;
        //0.2秒の待ち
        yield return(new WaitForSeconds(0.2f));

        //揺らすのやめ
        shake = false;
        //1秒の待ち
        yield return(new WaitForSeconds(1.0f));



        //撤退動作 ピンセットが初期位置に戻る
        speed = 4.0f;
        //Vector3 direction3 = new Vector3(-4f, 22f, 0f);
        Vector3 direction3 = new Vector3(x1, y1, 0f);

        for (int i = 0; i < 5; i++)
        {
            transform.position = Vector3.MoveTowards(transform.position, direction3, speed);
            yield return(null);
        }
        //3秒の待ち
        yield return(new WaitForSeconds(3.0f));
    }
Exemplo n.º 17
0
 /// <summary>
 /// シーンが破棄されるときに呼び出されます。
 /// </summary>
 void OnDestroy()
 {
     CrossSceneAudioPlayer.StopBGM();
     SceneManager.UnloadSceneAsync("SubGame");
 }
 // Start is called before the first frame update
 void Start()
 {
     // 確実に BGM が流れるようにする
     CrossSceneAudioPlayer.ChangeBGM(BGM);
 }