Added Sound effect configuration and implementation.
This commit is contained in:
@@ -69,6 +69,7 @@ All rights reserved.
|
||||
#include "Merchant.h"
|
||||
#include "SaveFile.h"
|
||||
#include "TitleScreen.h"
|
||||
#include "SoundEffect.h"
|
||||
#ifndef __EMSCRIPTEN__
|
||||
#include "discord.h"
|
||||
#endif
|
||||
@@ -237,6 +238,7 @@ bool AiL::OnUserCreate(){
|
||||
|
||||
Audio::Initialize();
|
||||
EnvironmentalAudio::Initialize();
|
||||
SoundEffect::Initialize();
|
||||
|
||||
LoadLevel(LEVEL_NAMES["starting_map"_S]);
|
||||
ChangePlayerClass(WARRIOR);
|
||||
@@ -2467,6 +2469,9 @@ bool AiL::UseLoadoutItem(int slot){
|
||||
if(GetLoadoutItem(slot).lock()->Amt()>0){
|
||||
Inventory::UseItem(GetLoadoutItem(slot).lock()->ActualName());
|
||||
GetLoadoutItem(slot).lock()->amt--;
|
||||
if(GetLoadoutItem(slot).lock()->UseSound().length()>0){
|
||||
SoundEffect::PlaySFX(GetLoadoutItem(slot).lock()->UseSound());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user