//0~1 // (0で止まる) (1でノーマル速度) public void SlowSE(ESEChannelList channnel, float speed) { if (speed <= 0) { speed = 0; } if (speed >= 1) { speed = 1; } SetPitchSE(channnel, speed); }
//0~1 // (0でとまる) (1で最速巻き戻し) public void RewindSE(ESEChannelList channnel, float speed) { speed = -speed * 3; if (speed <= -3) { speed = -3; } if (speed >= 0) { speed = 0; } SetPitchSE(channnel, speed); }
//0~1 // (0でノーマル速度) (1で最速) public void TempoUpSE(ESEChannelList channnel, float speed) { speed = speed * 2 + 1; if (speed <= 1) { speed = 1; } if (speed >= 3) { speed = 3; } SetPitchSE(channnel, speed); }
void SetPitchSE(ESEChannelList channnel, float speed) { switch (channnel) { case ESEChannelList._1: case ESEChannelList._2: case ESEChannelList._3: case ESEChannelList._4: case ESEChannelList._5: case ESEChannelList._6: case ESEChannelList._7: case ESEChannelList._8: m_seChannel[(int)channnel].GetComponent <CAudio>().SetPitch(0, speed, false); break; } }
//ヴォリューム0~1 public void ChangeVolSE(ESEChannelList channnel, float vol) { switch (channnel) { case ESEChannelList._1: case ESEChannelList._2: case ESEChannelList._3: case ESEChannelList._4: case ESEChannelList._5: case ESEChannelList._6: case ESEChannelList._7: case ESEChannelList._8: m_seChannel[(int)channnel].GetComponent <CAudio>().SetVolume(0, vol, true); break; } }
//Channelがnoneだと制御しないゲームオブジェクトを作成させる。 public void PlaySE(EAudioList audio, ESEChannelList channnel, bool isLoop) { switch (channnel) { case ESEChannelList._1: case ESEChannelList._2: case ESEChannelList._3: case ESEChannelList._4: case ESEChannelList._5: case ESEChannelList._6: case ESEChannelList._7: case ESEChannelList._8: m_seChannel[(int)channnel].GetComponent <CAudio>().Play(m_audioClips[(int)audio], false, 0, isLoop); m_seChannel[(int)channnel].GetComponent <CAudio>().SetVolume(0, 1, false); break; } }
public bool CheckIsPlay(ESEChannelList channnel) { return(m_seChannel[(int)channnel].GetComponent <CAudio>().GetIsPlaying()); }
public void StopSE(ESEChannelList channnel) { m_seChannel[(int)channnel].GetComponent <CAudio>().Stop(false, 0); }
//ノーマル速度にする public void NormalSpeedSE(ESEChannelList channnel) { SetPitchSE(channnel, 1); }