mirror of
https://github.com/danbulant/arcade-machine
synced 2026-06-18 22:11:26 +00:00
Added comments
This commit is contained in:
parent
d6154ad3f5
commit
693b6ef5aa
1 changed files with 11 additions and 12 deletions
|
|
@ -14,7 +14,8 @@
|
|||
</script> <!--Loadne Vars.js-->
|
||||
<div class="hlavnidiv">
|
||||
<div class="container">
|
||||
<button class="move" type="button" id="sdvx3-button" onclick="vers=3;sdvx()">
|
||||
<button class="move" type="button" id="sdvx3-button" onclick="vers=3;sdvx()"> <!-- on click sets var vers to number and then runs sdvx which is just switch for
|
||||
game path select-->
|
||||
<img src="JPGS/sound-voltex-iii-gravity-wars-1.png" alt="">
|
||||
<h1 class="sex">Sound Voltex III: Gravity Wars</h1>
|
||||
</button> <!--SDVX3-->
|
||||
|
|
@ -44,24 +45,21 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const prvnihra = [...document.querySelectorAll("button")]
|
||||
// for (i = 0; i < prvnihra.length; i++) {
|
||||
//console.log(prvnihra[i]);
|
||||
//}
|
||||
const prvnihra = [...document.querySelectorAll("button")] //creates array from buttons for focus select
|
||||
console.log(prvnihra[0])
|
||||
prvnihra[0].focus(); /* Handles interaction with bindable buttons and focus*/
|
||||
prvnihra[0].focus();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
/**/
|
||||
//SFX Audio Sources
|
||||
var i = 0;
|
||||
const switchfocus = new Audio("Audio/switchfocus.mp3");
|
||||
const startaudio = new Audio("Audio/audiostart.mp3")
|
||||
/* Handles interaction with bindable buttons and focus*/
|
||||
document.addEventListener("keydown", function (KeypressD) {
|
||||
if (KeypressD.code === KeyRight) {
|
||||
if (i >= prvnihra.length - 1) i = -1;
|
||||
switchfocus.play();
|
||||
switchfocus.play(); //plays audio
|
||||
i++;
|
||||
prvnihra[i].focus();
|
||||
console.log("right", i);
|
||||
|
|
@ -116,16 +114,17 @@
|
|||
|
||||
|
||||
<script>
|
||||
var vers = 0; /* Handles Running of apps */
|
||||
var vers = 0;
|
||||
const { execFile, exec, spawn } = require('child_process');
|
||||
function sdvx() {
|
||||
console.log("promenna", vers);
|
||||
/* Handles Running of apps */
|
||||
switch (vers) {
|
||||
case 3:
|
||||
execFile(AsphyxiaPath);
|
||||
exec("start /b " + SDVX3Path);
|
||||
exec("start /b " + SDVX3Path); //executes cmd with start and path
|
||||
setTimeout(function () {
|
||||
exec("taskkill /im " + browser)
|
||||
exec("taskkill /im " + browser)//kills browser
|
||||
}, 2000)
|
||||
//console.log(vers);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue