3D sound now updates in realtime

This commit is contained in:
grayson committed 2021-10-15 14:24:08 -05:00
1 parent 98d093c285
commit c30f159429
10 files changed
+239 -129

No files matched your search

+1 -1
View File
@@ -135,6 +135,6 @@ move "*.nfpack" "$(OutDir)assets\"</Command>
<_delete Include="$(OutDir)**\*" />
</ItemGroup>
<Delete Files="@(_delete)" />
<RemoveDir Directories="$(OUTDIR)" />
<RemoveDir Directories="$(OUTDIR)" />
</Target>
</Project>
+2 -1
View File
@@ -7,9 +7,10 @@ int main(int argc, char* argv[]) {
//app.setWindowIcon(...);
// app.setWindowCursor(...);
//Has to be on the heap for some reason
MainState* test = new MainState;
app.addState(test, "Main State");
app.addDefaultState("Main State");
app.setDefaultState("Main State");
app.run();
+5 -2
View File
@@ -67,8 +67,11 @@ void MainState::update(double deltaTime) {
if (button.isClicked())
app->changeState("Main State");
if (button.isClicked() || app->isKeyPressed(NFI_SPACE))
sound.play();
if (button2.isClicked() || app->isKeyHeld(NFI_SPACE))
sound.play(true);
if (app->isKeyPressed(NFI_O))
sound.stop();
if (app->isKeyPressed(NFI_ESCAPE))
app->quit();