From 4ec6f33be6130705b81f19fdc9e2fe01b4a3e7e2 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 5 Jun 2021 21:03:47 +0200 Subject: Stats presque fini --- race/cars/keymap.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'race/cars/keymap.js') diff --git a/race/cars/keymap.js b/race/cars/keymap.js index 74cce0a..221a7ec 100644 --- a/race/cars/keymap.js +++ b/race/cars/keymap.js @@ -29,6 +29,7 @@ startHooks.push(() => { car0cspeed = car0cspeed + 0.2; } if (document.getElementById("car0").style.transform !== "rotate(-90deg)") { + require('electron').ipcRenderer.send('addstats', { catalog: "ingame", key: "turns", add: 1 }); document.getElementById("car0").style.transform = "rotate(-90deg)"; car0collisionon = false; setTimeout(() => { @@ -41,6 +42,7 @@ startHooks.push(() => { car0cspeed = car0cspeed + 0.2; } if (document.getElementById("car0").style.transform !== "rotate(90deg)") { + require('electron').ipcRenderer.send('addstats', { catalog: "ingame", key: "turns", add: 1 }); document.getElementById("car0").style.transform = "rotate(90deg)"; car0collisionon = false; setTimeout(() => { @@ -53,6 +55,7 @@ startHooks.push(() => { car0cspeed = car0cspeed + 0.2; } if (document.getElementById("car0").style.transform !== "rotate(180deg)") { + require('electron').ipcRenderer.send('addstats', { catalog: "ingame", key: "turns", add: 1 }); document.getElementById("car0").style.transform = "rotate(180deg)"; car0collisionon = false; setTimeout(() => { @@ -65,6 +68,7 @@ startHooks.push(() => { car0cspeed = car0cspeed + 0.2; } if (document.getElementById("car0").style.transform !== "rotate(0deg)") { + require('electron').ipcRenderer.send('addstats', { catalog: "ingame", key: "turns", add: 1 }); document.getElementById("car0").style.transform = "rotate(0deg)"; car0collisionon = false; setTimeout(() => { -- cgit