diff --git a/README.md b/README.md index d4ca87c..b97b71d 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ You can listen to [the soundtrack here](https://youtu.be/0JXQqLwuy6E). ## Licenses ### Code -- The CSS loader / spinner is MIT ([https://github.com/vineethtrv/css-loader]). -- The CSS background pattern is MIT ([https://github.com/Afif13/CSS-Pattern]). +- The CSS loader / spinner is MIT: https://github.com/vineethtrv/css-loader +- The CSS background pattern is MIT: https://github.com/Afif13/CSS-Pattern - The remainder of the code is written by [Pyrious](https://github.com/benfrankel) and [necrashter](https://github.com/necrashter/), and is dual-licensed under MIT and Apache 2.0. ### Audio diff --git a/src/upgrade.rs b/src/upgrade.rs index 4eb5133..8885d72 100644 --- a/src/upgrade.rs +++ b/src/upgrade.rs @@ -336,7 +336,7 @@ fn load_upgrade_sequence(mut commands: Commands) { vec![TouchOfLifePlugin], "\"I don't know what I'm making, but I should start spawning entities.\"".to_string(), ), - + // Reward (vec![ImportLibrary], String::new()), @@ -353,14 +353,14 @@ fn load_upgrade_sequence(mut commands: Commands) { vec![Inspiration], "\"I should spawn a lot of entities for a higher Theme Interpretation score... Is 50 enough?\"".to_string(), ), - + // Reward ( vec![UtilPlugin], "\"I can lay some groundwork now to support all of these entities.\"".to_string(), ), (vec![Autocomplete], String::new()), - + // Explain technical debt ( vec![SpeedPlugin], @@ -375,7 +375,6 @@ fn load_upgrade_sequence(mut commands: Commands) { "\"Much better.\"".to_string(), ), - // End tutorial ( vec![Brainstorm], diff --git a/web/index.html b/web/index.html index c07afaf..68fcb9d 100644 --- a/web/index.html +++ b/web/index.html @@ -36,8 +36,18 @@ }); observer.observe(bevy, { attributes: true }); + // Play background music + let clicks = 0; function playMusic() { + // Trigger and remove the event listener on the second click + clicks++; + if (clicks < 2) { + return; + } else { + document.removeEventListener('click', playMusic); + } + // Create an AudioContext const audioContext = new (window.AudioContext || window.webkitAudioContext)(); @@ -75,9 +85,6 @@ }; request.send(); - - // Remove the click event listener after the first click - document.removeEventListener('click', playMusic); } // Add an event listener for the DOMContentLoaded event (if the browser supports the Web Audio API)