playing a sound for quick highlight pointer(marker)

This commit is contained in:
Titus Tscharntke 2012-07-15 21:01:56 +00:00
parent e311c439f6
commit 69f4294950
3 changed files with 6 additions and 0 deletions

View File

@ -1684,6 +1684,9 @@ void Game::addOrReplaceInHighlightedCells(MarkedCell mc){
}
mc.setAliveCount(200);
highlightedCells.push_back(mc);
CoreData &coreData= CoreData::getInstance();
SoundRenderer &soundRenderer= SoundRenderer::getInstance();
soundRenderer.playFx(coreData.getMarkerSound());
}
void Game::ReplaceDisconnectedNetworkPlayersWithAI(bool isNetworkGame, NetworkRole role) {

View File

@ -365,6 +365,7 @@ void CoreData::load() {
clickSoundC.load(getGameCustomCoreDataPath(data_path, "data/core/menu/sound/click_c.wav"));
attentionSound.load(getGameCustomCoreDataPath(data_path, "data/core/menu/sound/attention.wav"));
highlightSound.load(getGameCustomCoreDataPath(data_path, "data/core/menu/sound/highlight.wav"));
markerSound.load(getGameCustomCoreDataPath(data_path, "data/core/menu/sound/sonar.wav"));
XmlTree xmlTree;
//string data_path = getGameReadWritePath(GameConstants::path_data_CacheLookupKey);

View File

@ -50,6 +50,7 @@ private:
StaticSound clickSoundC;
StaticSound attentionSound;
StaticSound highlightSound;
StaticSound markerSound;
SoundContainer waterSounds;
Texture2D *logoTexture;
@ -163,6 +164,7 @@ public:
StaticSound *getClickSoundC() {return &clickSoundC;}
StaticSound *getAttentionSound() {return &attentionSound;}
StaticSound *getHighlightSound() {return &highlightSound;}
StaticSound *getMarkerSound() {return &markerSound;}
StaticSound *getWaterSound() {return waterSounds.getRandSound();}
Font2D *getDisplayFont() const {return displayFont;}