Commit 1188b0ff authored by wanqing's avatar wanqing

音效优化

parent 3fdd71b6
...@@ -183,22 +183,26 @@ public class BattleUI : MonoBehaviour ...@@ -183,22 +183,26 @@ public class BattleUI : MonoBehaviour
//{ //{
// m_gameBestTime.text = string.Format("{0:d2}:{1:d2}", varCurTime / 60, varCurTime % 60); // m_gameBestTime.text = string.Format("{0:d2}:{1:d2}", varCurTime / 60, varCurTime % 60);
//} //}
GameServices.audioServices.RecycleBgm(); //做法2
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.Success,false, delegate () //GameServices.audioServices.RecycleBgm();
{ //GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.Success,false, delegate ()
GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm); //{
}); // GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm);
//});
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.Success);
} }
//失败 //失败
public void OnBattleFail() public void OnBattleFail()
{ {
m_loseObj.SetActive(true); m_loseObj.SetActive(true);
m_selectLevelObj.SetActive(false); m_selectLevelObj.SetActive(false);
GameServices.audioServices.RecycleBgm(); //做法2
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.GetFail(),false, delegate () //GameServices.audioServices.RecycleBgm();
{ //GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.GetFail(),false, delegate ()
GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm); //{
}); // GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm);
//});
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.GetFail());
} }
/// 加载关卡前调用,隐藏不需要显示的ui /// 加载关卡前调用,隐藏不需要显示的ui
public void OnBeforeLoadLevel() public void OnBeforeLoadLevel()
......
...@@ -273,7 +273,7 @@ public class ChainRopeView : MonoBehaviour ...@@ -273,7 +273,7 @@ public class ChainRopeView : MonoBehaviour
{ {
m_bControlPlayAudio = true; m_bControlPlayAudio = true;
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp); GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp);
PlayShake(); //PlayShake();
//m_clawDownOrUpAudioSource = GameServices.audioServices.GetPlayAudioSource(GameServices.configService.audioConfig.clawDownOrUp); //m_clawDownOrUpAudioSource = GameServices.audioServices.GetPlayAudioSource(GameServices.configService.audioConfig.clawDownOrUp);
m_lightObj.SetParent(m_clawBody.parent.parent); m_lightObj.SetParent(m_clawBody.parent.parent);
if (m_bIsCatch) if (m_bIsCatch)
...@@ -584,6 +584,7 @@ public class ChainRopeView : MonoBehaviour ...@@ -584,6 +584,7 @@ public class ChainRopeView : MonoBehaviour
if (m_bCatchTouchUp) if (m_bCatchTouchUp)
{ {
m_bIsClawUp = false; m_bIsClawUp = false;
PlayShake();
cursor.ChangeLength(rope.restLength + GameServices.configService.playerConfig.ropeExtendSpeed * Time.deltaTime); cursor.ChangeLength(rope.restLength + GameServices.configService.playerConfig.ropeExtendSpeed * Time.deltaTime);
} }
else else
...@@ -597,9 +598,10 @@ public class ChainRopeView : MonoBehaviour ...@@ -597,9 +598,10 @@ public class ChainRopeView : MonoBehaviour
{ {
m_bControlPlayAudio = false; m_bControlPlayAudio = false;
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp); GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp);
PlayShake(); //PlayShake();
} }
m_bIsClawUp = true; m_bIsClawUp = true;
PlayShake();
cursor.ChangeLength(rope.restLength - GameServices.configService.playerConfig.ropeReduceSpeed * Time.deltaTime); cursor.ChangeLength(rope.restLength - GameServices.configService.playerConfig.ropeReduceSpeed * Time.deltaTime);
} }
else else
...@@ -631,9 +633,10 @@ public class ChainRopeView : MonoBehaviour ...@@ -631,9 +633,10 @@ public class ChainRopeView : MonoBehaviour
{ {
m_bControlPlayAudio = false; m_bControlPlayAudio = false;
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp); GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp);
PlayShake(); //PlayShake();
} }
m_bIsClawUp = true; m_bIsClawUp = true;
PlayShake();
cursor.ChangeLength(rope.restLength - GameServices.configService.playerConfig.ropeReduceSpeed * Time.deltaTime); cursor.ChangeLength(rope.restLength - GameServices.configService.playerConfig.ropeReduceSpeed * Time.deltaTime);
} }
else else
...@@ -659,6 +662,7 @@ public class ChainRopeView : MonoBehaviour ...@@ -659,6 +662,7 @@ public class ChainRopeView : MonoBehaviour
if (m_bPress) if (m_bPress)
{ {
m_bIsClawUp = false; m_bIsClawUp = false;
PlayShake();
cursor.ChangeLength(rope.restLength + GameServices.configService.playerConfig.ropeExtendSpeed * Time.deltaTime); cursor.ChangeLength(rope.restLength + GameServices.configService.playerConfig.ropeExtendSpeed * Time.deltaTime);
} }
if (m_bColliderTarget) if (m_bColliderTarget)
...@@ -681,9 +685,10 @@ public class ChainRopeView : MonoBehaviour ...@@ -681,9 +685,10 @@ public class ChainRopeView : MonoBehaviour
{ {
m_bControlPlayAudio = false; m_bControlPlayAudio = false;
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp); GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.clawDownOrUp);
PlayShake(); //PlayShake();
} }
m_bIsClawUp = true; m_bIsClawUp = true;
PlayShake();
cursor.ChangeLength(rope.restLength - GameServices.configService.playerConfig.ropeReduceSpeed * Time.deltaTime); cursor.ChangeLength(rope.restLength - GameServices.configService.playerConfig.ropeReduceSpeed * Time.deltaTime);
} }
else else
......
...@@ -1142,9 +1142,9 @@ RectTransform: ...@@ -1142,9 +1142,9 @@ RectTransform:
m_Father: {fileID: 6064464676328073067} m_Father: {fileID: 6064464676328073067}
m_RootOrder: 11 m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: -751.7} m_AnchoredPosition: {x: 0, y: 300}
m_SizeDelta: {x: 270.69995, y: 304.19995} m_SizeDelta: {x: 270.69995, y: 304.19995}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8483656437218345309 --- !u!222 &8483656437218345309
...@@ -1181,7 +1181,7 @@ MonoBehaviour: ...@@ -1181,7 +1181,7 @@ MonoBehaviour:
m_BestFit: 0 m_BestFit: 0
m_MinSize: 1 m_MinSize: 1
m_MaxSize: 300 m_MaxSize: 300
m_Alignment: 4 m_Alignment: 7
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
m_HorizontalOverflow: 1 m_HorizontalOverflow: 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment