/// SEの再生 public void PlaySe(SeId id) { sePlayer[(int)id].Play(); if (id == SeId.Eat) { sePlayer[(int)id].Volume = 0.003f; } else { sePlayer[(int)id].Volume = 0.5f; } }
/// SEの再生(カメラからの距離に応じて音量が変化) public void PlaySeCamDis(SeId id, Vector3 pos) { float dis = Common.VectorUtil.Distance(pos, GameCtrlManager.GetInstance().CtrlCam.GetCamPos()); float vol = 1.0f; if (dis > 8.0f) { vol = 1.0f - (dis - 8.0f) / 32.0f; if (vol < 0.1f) { vol = 0.1f; } } if (id == SeId.Eat) { vol = 0.1f; } sePlayer[(int)id].Play(); sePlayer[(int)id].Volume = vol; }
/// SEの再生(カメラからの距離に応じて音量が変化) public void PlaySeCamDis( SeId id, Vector3 pos ) { float dis = Common.VectorUtil.Distance( pos, GameCtrlManager.GetInstance().CtrlCam.GetCamPos() ); float vol = 1.0f; if( dis > 8.0f ){ vol = 1.0f - (dis-8.0f) / 32.0f; if( vol < 0.1f ){ vol = 0.1f; } } if(id == SeId.Eat){ vol = 0.1f; } sePlayer[(int)id].Play(); sePlayer[(int)id].Volume = vol; }
/// SEの再生 public void PlaySe( SeId id ) { sePlayer[(int)id].Play(); if(id == SeId.Eat){ sePlayer[(int)id].Volume = 0.003f; }else{ sePlayer[(int)id].Volume = 0.5f; } }