public void PlaySound()
 {
     if (atomSrc != null)
     {
         atomSrc.Play();
     }
 }
Beispiel #2
0
    void OnGUI()
    {
        if (GUILayout.Button("BachIntro"))
        {
            bgmAtomSource.Play("BachIntro");
        }
        if (GUILayout.Button("gymnopedieIntro"))
        {
            bgmAtomSource.Play("gymnopedieIntro");
        }
        if (GUILayout.Button("kiraIntro"))
        {
            bgmAtomSource.Play("kiraIntro");
        }

        if (GUILayout.Button("Analyze"))
        {
            //	失敗する?
            float[] levels = new float[8];
            analyzer.GetSpectrumLevels(ref levels);
            float db = 20.0f * Mathf.Log10(levels[0]);
            Debug.Log(db);
        }


        if (GUILayout.Button("AnalyzeRMS"))
        {
            rms = analyzer.GetRms(0);
            Debug.Log("Player Level " + rms.ToString());
        }
        GUILayout.Label(rms.ToString());
    }
Beispiel #3
0
    /// <summary>
    /// タッチ音の再生スクリプト。
    /// </summary>
    /// <param name="judge">判定。PERFECT=1</param>
    public void Play_touch_sound(int judge)
    {
        //Debug.Log("sound " + judge);

        switch (judge)
        {
        case 1:
            clap_se.Play("clap");
            return;

        case 2:
            clap_se.Play("clap");
            return;

        case 3:
            clap_se.Play("clap");
            return;

        case 4:
            miss_se.Play("miss");
            return;

        default:
            break;
        }
    }
Beispiel #4
0
        public void PlaySound(string key)
        {
            GDESoundData data = new GDESoundData(key);

            cueSheetName          = data.CUE_SHEET_NAME;
            atomSourcetest.volume = 1.0f;
            atomSourcetest.Play(data.CUE_NAME);
            //atomSourcetest.Play(cueName);
        }
    public void PlayBGM()
    {
        source.Stop();

        source.cueSheet = "Common/BGM";
        source.cueName  = "bgm0";

        source.Play();
    }
Beispiel #6
0
 public void PlaySE(SEName cueName)
 {
     //Timerが鳴っていたら止める
     if (currentSeIndex == 20)
     {
         seSource.Stop();
     }
     currentSeIndex = (int)cueName;
     seSource.Play(currentSeIndex);
 }
Beispiel #7
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Player"))
        {
            _flagManager.deadZoneCol = true;
            //カメラのブレンド速度を変化させる
            _cinemachineBrain.m_DefaultBlend.m_Time = 0.7f;
            //カメラをぐるりんに近づける
            vCam.SetActive(true);
            NeoConfig.isSoundFade = true;
            CriAtom.SetCategoryVolume("BGM", 0.0f);
            var _rb2d = other.GetComponent <Rigidbody2D>();
            //ぐるりんの動き(操作系・重力系)を停止
            _rb2d.constraints = RigidbodyConstraints2D.FreezeAll;
            //顔を驚き顔に変更
            _flagManager.surprise_Face = true;
            // 残機を減らす
            RemainingLife.life -= 1;

            if (RemainingLife.life != 0)
            {
                if (_SEPlay == false)
                {
                    _flagManager.returnGravity = true;
                    _gameOverSE.Play();
                    _SEPlay = true;
                }
            }
            else if (RemainingLife.life == 0)
            {
                _flagManager.returnGravity = true;
                //残機が0ならGameOverを表示
                _gameOver.alpha = 1.0f;

                //ゲームオーバー時のBGMを鳴らす
                if (_SEPlay == false)
                {
                    _gameOverSE.Play();
                    _SEPlay = true;
                }
            }

            if (deadZone != null)
            {
                deadZone.BossSceneReload();
            }
            Invoke("GameOver", 2.0f);
        }
    }
Beispiel #8
0
    public void NameRepeat(Collision collision)
    {
        var ar  = strKatakana.Split(',');
        var ar2 = strHiragana.Split(',');

        enemyMoveAI = this.gameObject.GetComponent <EnemyMoveAI>().speed;
        for (int i = 0; i < strLength; i++)
        {
            if (GameObject.FindWithTag("flyingText"))
            {
                if (GameObject.Find(ar[i]) != null || GameObject.Find(ar2[i]) != null)
                {
                    enemyTMP[i].text = string.Format(ar[i]);
                    enemyTMP[i].fontSharedMaterial = blueMaterial;

                    CriAtomSource atomSrc = gameObject.GetComponent <CriAtomSource>();
                    if (atomSrc != null)
                    {
                        atomSrc.Play();
                    }

                    audio.PlayOneShot(DMGClip, 1.0f);
                    if (flag[i] == false)
                    {
                        animator.SetTrigger("Damage");
                        this.gameObject.GetComponent <EnemyMoveAI>().speed = enemyspeed;
                        strFlag++;
                        flag[i] = true;
                    }
                }
            }
        }
    }
Beispiel #9
0
    private IEnumerator Coroutine()
    {
        CriAtomSource atomSrc = gameObject.GetComponent <CriAtomSource>();

        if (atomSrc != null)
        {
            if (atombool == false)
            {
                atomSrc.Play(14);
                atombool = true;
            }
        }

        animator.SetTrigger("Dead");
        //1秒待機
        yield return(new WaitForSeconds(1.8f));

        this.gameObject.SetActive(false);
        for (int i = 0; i < strLength; i++)
        {
            enemyTMP[i].fontSharedMaterial = redMaterial;
        }
        strFlag = 0;

        atombool = false;

        newNameJudgeBoss.MobDestroybool = true;

        Destroy(this.gameObject);

        //コルーチンを終了
        yield break;
    }
Beispiel #10
0
 void OnCollisionEnter(Collision other)
 {
     if (other.gameObject.tag.Equals("kabe"))
     {
         CriAtomEx.SetGameVariable("myHit", 1f);
         //Debug.Log("kabe hit");
         CAS_Player.Play();
     }
     if (other.gameObject.tag.Equals("Cube"))
     {
         CriAtomEx.SetGameVariable("myHit", 0f);
         //Debug.Log("cube hit");
         CAS_Player.Play();
     }
     //Debug.Log("いちちクリエイター");
 }
Beispiel #11
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Gimmick"))
     {
         _rotSE.Play();
     }
 }
Beispiel #12
0
    private IEnumerator Coroutine()
    {
        CriAtomSource atomSrc = gameObject.GetComponent <CriAtomSource>();

        if (atomSrc != null)
        {
            atomSrc.Play(22);
        }

        animator.SetTrigger("Dead");
        //1秒待機
        yield return(new WaitForSeconds(1.5f));

        fadeController.isFadeOut = true;

        for (int i = 0; i < strLength; i++)
        {
            enemyTMP[i].fontSharedMaterial = redMaterial;
        }


        atombool = false;

        yield return(new WaitForSeconds(3.0f));

        SceneManager.LoadScene("GameClear");
        this.gameObject.SetActive(false);
        Destroy(this.gameObject);
        strFlag = 0;
        //コルーチンを終了
        yield break;
    }
Beispiel #13
0
    public void Awake()
    {
        bgm = gameObject.AddComponent<CriAtomSource>();
        bgm.cueSheet = cueSheetName;

        Button startButton = transform.FindChild("StartButton").GetComponent<Button>();
        Button stopButton = transform.FindChild("StopButton").GetComponent<Button>();
        startButton.onClick.AsObservable()
            .Subscribe(_ =>
            {
                if (bgm.IsPaused())
                {
                    bgm.Pause(false);
                } else
                {
                    Debug.Log("play!!");
                    bgm.Play(cueName);
                }
            });
        stopButton.onClick.AsObservable()
            .Subscribe(_ =>
            {
                if (!bgm.IsPaused())
                {
                    bgm.Pause(true);
                }
            });
    }
Beispiel #14
0
 void _playSE(ref string _cueName)
 {
     if (sourceSE != null)
     {
         sourceSE.Play(_cueName);
     }
 }
Beispiel #15
0
 void _playGameMusic(ref string _cueName)
 {
     if (sourceGameMusic != null)
     {
         sourceGameMusic.Play(_cueName);
     }
 }
Beispiel #16
0
    public void Method()
    {
        if (configbuttonOpen.activeSelf == false)
        {
            _open.Play();
            //configbuttonClose.SetActive(false);
            configbuttonOpen.SetActive(true);
            configwindow.SetActive(true);
            configbutton = true;

            if (titleback != null)
            {
                titleback.SetActive(true);
            }
        }
        else
        {
            _close.Play();
            //configbuttonClose.SetActive(true);
            configbuttonOpen.SetActive(false);
            configwindow.SetActive(false);
            configbutton = false;

            if (titleback != null)
            {
                titleback.SetActive(false);
            }
        }
    }
    public void NextImage()
    {
        CriAtomSource atomSrc = gameObject.GetComponent <CriAtomSource>();

        if (atomSrc != null)
        {
            atomSrc.Play();
        }
        if (Gif02.activeSelf)
        {
            SceneManager.LoadScene("Start Voice");
        }
        if (Gif01.activeSelf)
        {
            Gif01.SetActive(false);
            Gif02.SetActive(true);
            if (!nextbutton.activeSelf)
            {
                nextbutton.SetActive(true);
                Debug.Log("next1");
            }
            if (!returnbutton.activeSelf)
            {
                returnbutton.SetActive(true);
            }
            VoiceOtionText.SetActive(false);
            MikeOptionText.SetActive(true);
        }
    }
    public void NameRepeat()
    {
        for (int i = 0; i < strLength; i++)
        {
            if (GameObject.Find(HiraganaName[i]) != null || GameObject.Find(KatakanaName[i]) != null)
            {
                enemyTMP[i].text = string.Format(KatakanaName[i]);
                enemyTMP[i].fontSharedMaterial = blueMaterial;

                CriAtomSource atomSrc = gameObject.GetComponent <CriAtomSource>();
                if (atomSrc != null)
                {
                    atomSrc.Play();
                }

                audio.PlayOneShot(DMGClip, 1.0f);
                if (flag[i] == false)
                {
                    animator.SetTrigger("Damage");
                    strFlag++;
                    flag[i] = true;
                    Debug.Log(strFlag);
                }
            }
        }
    }
    public void PlayBGM()
    {
        bool startFlag = false;

        CriAtomSource.Status status = atomSourceBgm.status;
        if ((status == CriAtomSource.Status.Stop) || (status == CriAtomSource.Status.PlayEnd))
        {
            this.playbackBGM = atomSourceBgm.Play(100);
            startFlag        = true;
        }

        /*	Move to the next block except for the first playback. */
        if (startFlag == false)
        {
            int          cur = this.playbackBGM.GetCurrentBlockIndex();
            CriAtomExAcb acb = CriAtom.GetAcb("PinballMain");
            if (acb != null)
            {
                acb.GetCueInfo("BGM", out this.cueInfo);

                cur++;
                if (this.cueInfo.numBlocks > 0)
                {
                    this.playbackBGM.SetNextBlockIndex(cur % this.cueInfo.numBlocks);
                }
            }
        }
    }
Beispiel #20
0
    public void OnClick()
    {
        _cnt++;
        //一度だけStartSEを鳴らす
        if (_cnt == 1)
        {
            _startSE.Play();
            _cnt = 0;
        }
        //_fadeOut = true;
        //Debug.Log("CLICK");
        if (sceneChange.button == false)
        {
            sceneChange.button = true;
        }
        if (isBackToTitle)
        {
            sceneChange.isBackToTitle = true;
        }
        RemainingLife.bossLife = 0;
        config.configbutton    = false;

        /*if(SceneManager.GetActiveScene().name == "Title")
         * {
         *
         * }
         * else
         * {
         *  //Destroy(configCanvas);
         * }*/
    }
Beispiel #21
0
    void FixedUpdate()
    {
        //HP減ったときに何かするってなったらここいじってくれればおk
        if (hitCount >= HP1)
        {
            //stickFlagがtrueになるとstickEのスクリプトを活性化
            stickFlag = true;
        }
        else if (hitCount == HP2)
        {
            //第2段階に入る処理とかはここ。
        }

        if (stickFlag == true)
        {
            donguri.GetComponent <StickE5>().enabled = true;
            Enemy.Play();
            rotate.SpeedUp();
            if (counter)
            {
                counter.GetComponent <EneDestCount>().count--;
            }
            donguri.GetComponent <EnemyMove>().enabled          = false;
            donguri.GetComponent <NavMeshAgent>().enabled       = false;
            donguri.GetComponentInChildren <Animator>().enabled = false;
            donguri.GetComponent <MeshCollider>().enabled       = false;
            stickFlag = false;
            Destroy(WallCheck);
            Destroy(this);
            hitCount++;
        }
    }
Beispiel #22
0
    public override void ProcessFrame(Playable playable, FrameData info, object playerData)
    {
        m_AtomSource = playerData as CriAtomSource;

        if (m_AtomSource == null)
        {
            return;
        }

        float inputWeight = 0;
        int   inputCount  = playable.GetInputCount();

        for (int i = 0; i < inputCount; i++)
        {
            inputWeight = playable.GetInputWeight(i);

            if (inputWeight == 1)
            {
                ScriptPlayable <PlaybackCueBehaviour> inputPlayable = (ScriptPlayable <PlaybackCueBehaviour>)playable.GetInput(i);
                PlaybackCueBehaviour input = inputPlayable.GetBehaviour();

                if (input.cueName != String.Empty)
                {
                    m_AtomSource.cueName = input.cueName;
                }

                CriAtomSource.Status status = m_AtomSource.status;
                if ((status == CriAtomSource.Status.Stop) || (status == CriAtomSource.Status.PlayEnd))
                {//停止かエンドか
                    m_AtomSource.Play();
                }
            }
        }
    }
Beispiel #23
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Player"))
        {
            if (other.GetComponent <PlayerMove>().nowBossHand != null)
            {
                return;
            }
            else if (other.GetComponent <PlayerMove>().nowBossHand == null)
            {
                //FlagManagerのほうのジャンプ方向を上書き、PlayerMove側に伝える
                flagManager.gururinJumpDirection = jumpDirection;
            }
            if (gameController.isPress)
            {
                gameController.isPress = false;
            }
            //ぐるりんとStopColliderの接触を感知
            playerMove.nowGearGimiick = this;
            playerHit = true;

            if (categoly == Categoly.propeller)
            {
                click = true;
            }
            rotParm = false;

            //速度の上書きを止める
            playerMove.setSpeed = false;
            //回転速度を固定
            playerMove.speed[0] = rotSpeed;
            //ぐるりんの移動を止める
            playerMove.isMove     = false;
            _gururinRb2d.velocity = Vector2.zero;
            //効果音
            source.Play();

            _gururinRb2d.velocity = Vector2.zero;

            _gururinRb2d.isKinematic = true;
            //ぐるりんの位置を固定
            _gururinRb2d.MovePosition(gearPos.transform.position);
            //ぐるりんの角度を固定
            _gururinRb2d.rotation = _gpQuaternion.eulerAngles.z;


            flagManager.moveStop = true;

            if (bossHand != null)
            {
                bossHand.AttachPlayer();
            }

            if (turnUI != null)
            {
                turnUI.AttachPlayer(turnCategory);
            }
        }
    }
 public void PlaybackBumper(int index)
 {
     if (lastPlaybackBumperTime + 0.25 < Time.timeSinceLevelLoad)
     {
         atomSourceBumper.Play(index);
         lastPlaybackBumperTime = Time.timeSinceLevelLoad;
     }
 }
Beispiel #25
0
    //[SerializeField] ConversationController conversationController;
    //AnimatorStateInfo stateInfo;
    //private bool _volume;

    // Start is called before the first frame update
    void Start()
    {
        _source        = GetComponent <CriAtomSource>();
        _gururin       = GameObject.Find("Gururin");
        _source.volume = 0.0f;
        _source.Play();
        //_volume = false;
    }
Beispiel #26
0
 void OnTriggerEnter2D(Collider2D other)
 {
     //Groundタグと接触したときに足音を鳴らす
     if (other.CompareTag("Ground"))
     {
         _footStep.Play();
     }
 }
Beispiel #27
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Jump"))
     {
         collision = true;
         _breakSE.Play();
     }
 }
Beispiel #28
0
 private void OnTriggerStay2D(Collider2D other)
 {
     if (other.CompareTag("Player") && _sourceStart == false)
     {
         _source.Play();
         _sourceStart = true;
     }
 }
    public void CRIPlay1()
    {
        CriAtomSource atomSrc = gameObject.GetComponent <CriAtomSource>();

        if (atomSrc != null)
        {
            atomSrc.Play(25);
        }
    }
Beispiel #30
0
 public void LoadCueSheet(string cueSheetName, int bgmCueId)
 {
     CriAtom.RemoveCueSheet(beforeBGMCueSheetName);
     beforeBGMCueSheetName = cueSheetName;
     CriAtom.AddCueSheet(beforeBGMCueSheetName, beforeBGMCueSheetName + ".acb", null, null);
     bgmSource.cueSheet = beforeBGMCueSheetName;
     bgmSource.volume   = bgmVolume;
     bgmSource.Play(bgmCueId);
 }
Beispiel #31
0
    // Update is called once per frame
    void Update()
    {
        if (count > countMax)
        {
            count -= countMax;
            for (int i = 0; i < make; i++)
            {
                GameObject donguri;

                if (i % 5 == 0)
                {
                    donguri = Instantiate(BurndonguriTemp, stageObj.transform);
                }
                else
                {
                    donguri = Instantiate(donguriTemp, stageObj.transform);
                }

                Vector3 pos;
                while (true)
                {
                    pos.x = Random.Range(-1f, 1f);
                    pos.z = Random.Range(-1f, 1f);
                    var sqR = (pos.x * pos.x) + (pos.z * pos.z);
                    if (sqR < 1f)
                    {
                        break;
                    }
                }
                pos.x = pos.x * radius;
                pos.y = height;
                pos.z = pos.z * radius;
                donguri.transform.position = pos + gameObject.transform.position;
                donguri.SetActive(true);
                donguri.AddComponent <SphereCollider>().radius = 0.75f;
                donguri.GetComponent <Rigidbody>().useGravity  = true;

                if (i % 5 == 0)
                {
                    donguri.GetComponent <EnemyPunch>().enabled = false;
                    donguri.AddComponent <Burn_Firstset>();
                }
                else
                {
                    donguri.GetComponent <EnemyMove>().enabled = false;
                    donguri.AddComponent <Donguri_FirstSet>();
                }

                donguri.GetComponent <MeshCollider>().enabled = false;

                if (i == 0)
                {
                    Fall.Play();
                }
            }
        }
    }