Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FastMail
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanqing
FastMail
Commits
1188b0ff
Commit
1188b0ff
authored
Dec 30, 2020
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
音效优化
parent
3fdd71b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
18 deletions
+27
-18
BattleUI.cs
FastMail/Assets/0A2_Scripts/Battle/UI/BattleUI.cs
+14
-10
ChainRopeView.cs
FastMail/Assets/0A2_Scripts/Battle/View/ChainRopeView.cs
+9
-4
BattleUI.prefab
FastMail/Assets/0A3_Prefabs/BattleUI.prefab
+4
-4
No files found.
FastMail/Assets/0A2_Scripts/Battle/UI/BattleUI.cs
View file @
1188b0ff
...
...
@@ -183,22 +183,26 @@ public class BattleUI : MonoBehaviour
//{
// m_gameBestTime.text = string.Format("{0:d2}:{1:d2}", varCurTime / 60, varCurTime % 60);
//}
GameServices
.
audioServices
.
RecycleBgm
();
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
Success
,
false
,
delegate
()
{
GameServices
.
audioServices
.
PlayBgm
(
GameServices
.
configService
.
audioConfig
.
GameBgm
);
});
//做法2
//GameServices.audioServices.RecycleBgm();
//GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.Success,false, delegate ()
//{
// GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm);
//});
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
Success
);
}
//失败
public
void
OnBattleFail
()
{
m_loseObj
.
SetActive
(
true
);
m_selectLevelObj
.
SetActive
(
false
);
GameServices
.
audioServices
.
RecycleBgm
();
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
GetFail
(),
false
,
delegate
()
{
GameServices
.
audioServices
.
PlayBgm
(
GameServices
.
configService
.
audioConfig
.
GameBgm
);
});
//做法2
//GameServices.audioServices.RecycleBgm();
//GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.GetFail(),false, delegate ()
//{
// GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm);
//});
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
GetFail
());
}
/// 加载关卡前调用,隐藏不需要显示的ui
public
void
OnBeforeLoadLevel
()
...
...
FastMail/Assets/0A2_Scripts/Battle/View/ChainRopeView.cs
View file @
1188b0ff
...
...
@@ -273,7 +273,7 @@ public class ChainRopeView : MonoBehaviour
{
m_bControlPlayAudio
=
true
;
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
clawDownOrUp
);
PlayShake
();
//
PlayShake();
//m_clawDownOrUpAudioSource = GameServices.audioServices.GetPlayAudioSource(GameServices.configService.audioConfig.clawDownOrUp);
m_lightObj
.
SetParent
(
m_clawBody
.
parent
.
parent
);
if
(
m_bIsCatch
)
...
...
@@ -584,6 +584,7 @@ public class ChainRopeView : MonoBehaviour
if
(
m_bCatchTouchUp
)
{
m_bIsClawUp
=
false
;
PlayShake
();
cursor
.
ChangeLength
(
rope
.
restLength
+
GameServices
.
configService
.
playerConfig
.
ropeExtendSpeed
*
Time
.
deltaTime
);
}
else
...
...
@@ -597,9 +598,10 @@ public class ChainRopeView : MonoBehaviour
{
m_bControlPlayAudio
=
false
;
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
clawDownOrUp
);
PlayShake
();
//
PlayShake();
}
m_bIsClawUp
=
true
;
PlayShake
();
cursor
.
ChangeLength
(
rope
.
restLength
-
GameServices
.
configService
.
playerConfig
.
ropeReduceSpeed
*
Time
.
deltaTime
);
}
else
...
...
@@ -631,9 +633,10 @@ public class ChainRopeView : MonoBehaviour
{
m_bControlPlayAudio
=
false
;
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
clawDownOrUp
);
PlayShake
();
//
PlayShake();
}
m_bIsClawUp
=
true
;
PlayShake
();
cursor
.
ChangeLength
(
rope
.
restLength
-
GameServices
.
configService
.
playerConfig
.
ropeReduceSpeed
*
Time
.
deltaTime
);
}
else
...
...
@@ -659,6 +662,7 @@ public class ChainRopeView : MonoBehaviour
if
(
m_bPress
)
{
m_bIsClawUp
=
false
;
PlayShake
();
cursor
.
ChangeLength
(
rope
.
restLength
+
GameServices
.
configService
.
playerConfig
.
ropeExtendSpeed
*
Time
.
deltaTime
);
}
if
(
m_bColliderTarget
)
...
...
@@ -681,9 +685,10 @@ public class ChainRopeView : MonoBehaviour
{
m_bControlPlayAudio
=
false
;
GameServices
.
audioServices
.
PlayAudio
(
GameServices
.
configService
.
audioConfig
.
clawDownOrUp
);
PlayShake
();
//
PlayShake();
}
m_bIsClawUp
=
true
;
PlayShake
();
cursor
.
ChangeLength
(
rope
.
restLength
-
GameServices
.
configService
.
playerConfig
.
ropeReduceSpeed
*
Time
.
deltaTime
);
}
else
...
...
FastMail/Assets/0A3_Prefabs/BattleUI.prefab
View file @
1188b0ff
...
...
@@ -1142,9 +1142,9 @@ RectTransform:
m_Father
:
{
fileID
:
6064464676328073067
}
m_RootOrder
:
11
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0
.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0
.5
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
-751.7
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
300
}
m_SizeDelta
:
{
x
:
270.69995
,
y
:
304.19995
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&8483656437218345309
...
...
@@ -1181,7 +1181,7 @@ MonoBehaviour:
m_BestFit
:
0
m_MinSize
:
1
m_MaxSize
:
300
m_Alignment
:
4
m_Alignment
:
7
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment