151 lines
8.5 KiB
Lua
151 lines
8.5 KiB
Lua
|
|
SoundSystem = SoundSystem or {}
|
|
|
|
SoundSystem.ESound = {
|
|
Scoll = 1,
|
|
Click = 2,
|
|
Btn = 3,
|
|
Kill = 4,
|
|
Kill2 = 5,
|
|
Kill3 = 6,
|
|
Incentive = 7,
|
|
ActiveMechanism = 8,
|
|
MechanismKill = 9,
|
|
|
|
HookFire = 101,
|
|
HookImpulse = 102,
|
|
Impulse = 103,
|
|
Dissipate = 104,
|
|
OkLetsGo = 105,
|
|
|
|
IsReady = 201,
|
|
Clock = 202,
|
|
TrapOpen = 203,
|
|
GameStart = 204,
|
|
Impact = 205, -- 击打音效
|
|
BreakWind = 206, -- 破风
|
|
Star = 207, -- 获得星星
|
|
Pu = 208,
|
|
|
|
Shot_Boom = 209,
|
|
Boom2 = 210,
|
|
AddScore = 211,
|
|
Error = 212,
|
|
Right = 213,
|
|
Point = 214;
|
|
PickUpBuff = 215;
|
|
KillFX = 216;
|
|
|
|
-- Piano
|
|
Piano_3dd = 1073,
|
|
Piano_6dd = 1076,
|
|
Piano_2ddd = 1082,
|
|
|
|
}
|
|
|
|
|
|
SoundSystem.EMusic = {
|
|
-- UGC Music
|
|
Music1 = 100001 ,
|
|
Music2 = 100002 ,
|
|
Music3 = 100003 ,
|
|
Music4 = 100004 ,
|
|
Music5 = 100005 ,
|
|
Music6 = 100006 ,
|
|
Music7 = 100007 ,
|
|
Music8 = 100008 ,
|
|
Music9 = 100009 ,
|
|
Music10 = 100010 ,
|
|
Music11 = 100011 ,
|
|
Music12 = 100012 ,
|
|
Music13 = 100013 ,
|
|
Music14 = 100014 ,
|
|
}
|
|
|
|
SoundSystem.MusicName = {
|
|
[SoundSystem.EMusic.Music1 ] = "盛夏空投", -- 节奏
|
|
[SoundSystem.EMusic.Music2 ] = "赛博纪元", -- 科技节奏
|
|
[SoundSystem.EMusic.Music3 ] = "魔鬼纵队", -- 幽灵的感觉
|
|
[SoundSystem.EMusic.Music4 ] = "勇气", -- 人声
|
|
[SoundSystem.EMusic.Music5 ] = "四圣降临", -- 叶问的感觉
|
|
[SoundSystem.EMusic.Music6 ] = "沙漠绿洲", -- 平静
|
|
[SoundSystem.EMusic.Music7 ] = "锦绣年画", -- 过年 年年有余的感觉
|
|
[SoundSystem.EMusic.Music8 ] = "电音嘉年华",--类似悬溺
|
|
[SoundSystem.EMusic.Music9 ] = "空投行动", -- 射击长时间玩法
|
|
[SoundSystem.EMusic.Music10] = "未来之城", -- 跑酷等
|
|
[SoundSystem.EMusic.Music11] = "大战在即",
|
|
[SoundSystem.EMusic.Music12] = "激战隆冬",
|
|
[SoundSystem.EMusic.Music13] = "声动光影",
|
|
[SoundSystem.EMusic.Music14] = "起飞特种兵",
|
|
}
|
|
|
|
SoundSystem.SoundList = {
|
|
[SoundSystem.ESound.Scoll] = '/Game/WwiseEvent/UI/Play_UI_Item_Change.Play_UI_Item_Change',
|
|
[SoundSystem.ESound.Click] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Click_2_1.AK_Click_2_1'),
|
|
[SoundSystem.ESound.Btn] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Button_1.AK_Button_1'),
|
|
[SoundSystem.ESound.Kill] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/Audio_Kill.Audio_Kill'),
|
|
[SoundSystem.ESound.Kill2] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Kill2_1.AK_Kill2_1'),
|
|
[SoundSystem.ESound.Kill3] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Kill3_1.AK_Kill3_1'),
|
|
[SoundSystem.ESound.Incentive] = '/Game/WwiseEvent/UI/Play_UI_Champion.Play_UI_Champion',
|
|
[SoundSystem.ESound.ActiveMechanism] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_ActiveMechanism_1.AK_ActiveMechanism_1'),
|
|
[SoundSystem.ESound.MechanismKill] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_MechanismKill_1.AK_MechanismKill_1'),
|
|
|
|
[SoundSystem.ESound.HookFire] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/Ak_HookFire_1.Ak_HookFire_1'),
|
|
[SoundSystem.ESound.HookImpulse] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/Ak_HookImpulse_1.Ak_HookImpulse_1'),
|
|
[SoundSystem.ESound.Impulse] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/Ak_Impulse_1.Ak_Impulse_1'),
|
|
[SoundSystem.ESound.Dissipate] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Dissipate_1.AK_Dissipate_1'),
|
|
[SoundSystem.ESound.OkLetsGo] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_OkLetsGo_1.AK_OkLetsGo_1'),
|
|
[SoundSystem.ESound.IsReady] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_IsReady_1.AK_IsReady_1'),
|
|
[SoundSystem.ESound.Clock] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/T_Clock_1.T_Clock_1'),
|
|
[SoundSystem.ESound.TrapOpen] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_OpenDoor_1.AK_OpenDoor_1'),
|
|
[SoundSystem.ESound.GameStart] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_GameStart_1.AK_GameStart_1'),
|
|
[SoundSystem.ESound.Impact] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Impact_1.AK_Impact_1'),
|
|
[SoundSystem.ESound.BreakWind] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_BreakWind_1.AK_BreakWind_1'),
|
|
[SoundSystem.ESound.Star] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Star_1.AK_Star_1'),
|
|
[SoundSystem.ESound.Pu] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_PU_1.AK_PU_1'),
|
|
[SoundSystem.ESound.Shot_Boom] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AT_Shot_Boom_1.AT_Shot_Boom_1'),
|
|
|
|
[SoundSystem.ESound.Boom2] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Boom2_1.AK_Boom2_1'),
|
|
[SoundSystem.ESound.AddScore] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_AddScore_1.AK_AddScore_1'),
|
|
[SoundSystem.ESound.Error] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Error_1.AK_Error_1'),
|
|
[SoundSystem.ESound.Right] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Right_1.AK_Right_1'),
|
|
[SoundSystem.ESound.Point] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Point_1.AK_Point_1'),
|
|
|
|
[SoundSystem.ESound.PickUpBuff] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_PickUpBuff_1.AK_PickUpBuff_1');
|
|
[SoundSystem.ESound.KillFX] ='/Game/WwiseEvent/UI/Play_UI_KillEffect.Play_UI_KillEffect';
|
|
|
|
[SoundSystem.ESound.Piano_3dd] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Piano_3dd_1.AK_Piano_3dd_1'),
|
|
[SoundSystem.ESound.Piano_6dd] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Piano_6dd_1.AK_Piano_6dd_1'),
|
|
[SoundSystem.ESound.Piano_2ddd] = UGCGameSystem.GetUGCResourcesFullPath('Asset/WwiseEvent/AK_Piano_2ddd_1.AK_Piano_2ddd_1'),
|
|
|
|
[SoundSystem.EMusic.Music1 ] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_Summer_Theme_CG014.Play_Music_Summer_Theme_CG014',
|
|
[SoundSystem.EMusic.Music2 ] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_Cyberpunk_Theme.Play_Music_Cyberpunk_Theme',
|
|
[SoundSystem.EMusic.Music3 ] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_Halloween.Play_Music_Halloween',
|
|
[SoundSystem.EMusic.Music4 ] = '/Game/WwiseEvent/Music/Music_Auto/Play_Music_Auto_Courage.Play_Music_Auto_Courage',
|
|
[SoundSystem.EMusic.Music5 ] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_MythicalCreatures_CG011.Play_Music_MythicalCreatures_CG011',
|
|
[SoundSystem.EMusic.Music6 ] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_SS6_Theme.Play_Music_SS6_Theme',
|
|
[SoundSystem.EMusic.Music7 ] = '/Game/WwiseEvent/Music/Music_Main/Play_CG021_Music_Gardens_SpringFestival_Theme.Play_CG021_Music_Gardens_SpringFestival_Theme',
|
|
[SoundSystem.EMusic.Music8 ] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_717Summer_EDM.Play_Music_717Summer_EDM',
|
|
[SoundSystem.EMusic.Music9 ] = '/Game/WwiseEvent/Music/Music_Main/Play_CG018_Music_Celebration_Theme.Play_CG018_Music_Celebration_Theme',
|
|
[SoundSystem.EMusic.Music10] = '/Game/WwiseEvent/Music/Music_Main/Play_CG019_Music_FutureCity_Theme.Play_CG019_Music_FutureCity_Theme',
|
|
[SoundSystem.EMusic.Music11] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_Snow_Theme_CG010.Play_Music_Snow_Theme_CG010',
|
|
[SoundSystem.EMusic.Music12] = '/Game/WwiseEvent/Music/Music_Main/Play_CG016_Music_Winter_Theme.Play_CG016_Music_Winter_Theme',
|
|
[SoundSystem.EMusic.Music13] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_MovieStudio_Theme_CG015.Play_Music_MovieStudio_Theme_CG015',
|
|
[SoundSystem.EMusic.Music14] = '/Game/WwiseEvent/Music/Music_Main/Play_Music_Future_CG013.Play_Music_Future_CG013',
|
|
}
|
|
|
|
function SoundSystem.PlaySound(SoundType, TargetLocation, TargetRotation)
|
|
if SoundSystem.SoundList[SoundType] ~= nil then
|
|
local AKSound = UGCSystemLibrary.LoadAsset(SoundSystem.SoundList[SoundType], true)
|
|
if TargetLocation then
|
|
if TargetRotation == nil then
|
|
TargetRotation = VectorHelper.RotZero()
|
|
end
|
|
return UGCSoundManagerSystem.PlaySoundAtLocation(AKSound, TargetLocation, TargetRotation)
|
|
else
|
|
return UGCSoundManagerSystem.PlaySound2D(AKSound)
|
|
end
|
|
end
|
|
end
|
|
|