|
|
@ -106,27 +106,38 @@ void State_OverworldMap::OnUserUpdate(AiL*game){ |
|
|
|
Menu::OpenMenu(CRAFT_CONSUMABLE); |
|
|
|
Menu::OpenMenu(CRAFT_CONSUMABLE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(game->GetKey(K1).bPressed){ |
|
|
|
#pragma region Audio Test |
|
|
|
Audio::Play("sfx100v2_loop_water_01.mp3"_SFX); |
|
|
|
if(game->GetKey(K1).bPressed){ |
|
|
|
} |
|
|
|
Audio::Play("sfx100v2_loop_water_01.mp3"_SFX); |
|
|
|
if(game->GetKey(F1).bPressed){ |
|
|
|
} |
|
|
|
Audio::PlayBGM("foresty1_1"); |
|
|
|
if(game->GetKey(F1).bPressed){ |
|
|
|
}else |
|
|
|
Audio::PlayBGM("foresty1_1"); |
|
|
|
if(game->GetKey(F2).bPressed){ |
|
|
|
lastAudioTime=0.f; |
|
|
|
Audio::PlayBGM("foresty0"); |
|
|
|
}else |
|
|
|
} |
|
|
|
if(game->GetKey(F2).bPressed){ |
|
|
|
if(game->GetKey(K2).bPressed){ |
|
|
|
Audio::PlayBGM("foresty0"); |
|
|
|
Audio::SetAudioEvent("Default Volume"); |
|
|
|
lastAudioTime=0.f; |
|
|
|
} |
|
|
|
} |
|
|
|
if(game->GetKey(K3).bPressed){ |
|
|
|
if(game->GetKey(K2).bPressed){ |
|
|
|
Audio::SetAudioEvent("LowHealth"); |
|
|
|
Audio::SetAudioEvent("Default Volume"); |
|
|
|
} |
|
|
|
lastEventTime=0.f; |
|
|
|
if(game->GetKey(K4).bPressed){ |
|
|
|
} |
|
|
|
Audio::SetAudioEvent("InCombat"); |
|
|
|
if(game->GetKey(K3).bPressed){ |
|
|
|
} |
|
|
|
Audio::SetAudioEvent("LowHealth"); |
|
|
|
if(game->GetKey(K5).bPressed){ |
|
|
|
lastEventTime=0.f; |
|
|
|
Audio::SetAudioEvent("Underwater"); |
|
|
|
} |
|
|
|
} |
|
|
|
if(game->GetKey(K4).bPressed){ |
|
|
|
|
|
|
|
Audio::SetAudioEvent("InCombat"); |
|
|
|
|
|
|
|
lastEventTime=0.f; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(game->GetKey(K5).bPressed){ |
|
|
|
|
|
|
|
Audio::SetAudioEvent("Underwater"); |
|
|
|
|
|
|
|
lastEventTime=0.f; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lastEventTime=std::clamp(lastEventTime+game->GetElapsedTime(),0.f,5.0f); |
|
|
|
|
|
|
|
lastAudioTime=std::clamp(lastAudioTime+game->GetElapsedTime(),0.f,5.0f); |
|
|
|
|
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
|
|
#pragma region Handle Connection Point Clicking and Movement |
|
|
|
#pragma region Handle Connection Point Clicking and Movement |
|
|
|
for(ConnectionPoint&cp:connections){ |
|
|
|
for(ConnectionPoint&cp:connections){ |
|
|
@ -169,6 +180,16 @@ void State_OverworldMap::Draw(AiL*game){ |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#pragma region Audio Test |
|
|
|
|
|
|
|
std::stringstream eventText; |
|
|
|
|
|
|
|
eventText<<"Event Set to: "; |
|
|
|
|
|
|
|
eventText<<std::quoted(Audio::GetAudioEvent()); |
|
|
|
|
|
|
|
std::stringstream audioText; |
|
|
|
|
|
|
|
audioText<<"Audio Track Set to: "; |
|
|
|
|
|
|
|
audioText<<std::quoted(Audio::GetTrackName()); |
|
|
|
|
|
|
|
if(lastEventTime!=5.0f)game->DrawShadowStringPropDecal({2,game->ScreenHeight()-36.f},eventText.str(),{255,255,255,uint8_t(util::lerp(255,0,lastEventTime/5.0f))},{0,0,0,uint8_t(util::lerp(255,0,lastEventTime/5.0f))}); |
|
|
|
|
|
|
|
if(lastAudioTime!=5.0f)game->DrawShadowStringPropDecal({2,game->ScreenHeight()-20.f},audioText.str(),{255,255,255,uint8_t(util::lerp(255,0,lastAudioTime/5.0f))},{0,0,0,uint8_t(util::lerp(255,0,lastAudioTime/5.0f))}); |
|
|
|
|
|
|
|
#pragma endregion |
|
|
|
}; |
|
|
|
}; |
|
|
|
void State_OverworldMap::SetStageMarker(std::string connectionName){ |
|
|
|
void State_OverworldMap::SetStageMarker(std::string connectionName){ |
|
|
|
for(ConnectionPoint&connection:connections){ |
|
|
|
for(ConnectionPoint&connection:connections){ |
|
|
|