// 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);
        }
    }
Exemple #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);
        }
    }
Exemple #8
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();
    }
Exemple #9
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);
    }
Exemple #10
0
 public void PlayOneShot(AudioClip clip)
 {
     CrossSceneAudioPlayer.PlaySE(clip);
 }
    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));
    }