economy
This commit is contained in:
parent
659274b087
commit
a455575a64
4 changed files with 11 additions and 8 deletions
|
@ -50,13 +50,15 @@
|
||||||
<script src="/js/twgl.min.js"></script>
|
<script src="/js/twgl.min.js"></script>
|
||||||
<script src="/js/idle.js" defer></script>
|
<script src="/js/idle.js" defer></script>
|
||||||
<script src="/js/index.js" defer></script>
|
<script src="/js/index.js" defer></script>
|
||||||
|
<script src="/js/upgrade.js" defer></script>
|
||||||
<link rel="stylesheet" href="main.css">
|
<link rel="stylesheet" href="main.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<canvas id="c" width="640" height="480"></canvas>
|
<canvas id="c" width="640" height="480"></canvas>
|
||||||
<div class='hud'>
|
<div class='hud'>
|
||||||
hud
|
<div class='main-hud'>hud</div>
|
||||||
|
<button class='buy'>test</button>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,3 @@ window.addEventListener('click', async (e) => {
|
||||||
nGain = oldNGain;
|
nGain = oldNGain;
|
||||||
clicking = false;
|
clicking = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
setInterval(function() {
|
|
||||||
cubePos.push([Math.random() * 1000 - 500, Math.random() * 1000 - 500, Math.random() * 30 - 200,
|
|
||||||
Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random() * 2 - 1
|
|
||||||
])
|
|
||||||
},100)
|
|
|
@ -142,7 +142,7 @@ function renderThing() {
|
||||||
|
|
||||||
requestAnimationFrame(renderThing);
|
requestAnimationFrame(renderThing);
|
||||||
}
|
}
|
||||||
let hud = document.querySelector('.hud');
|
let hud = document.querySelector('.main-hud');
|
||||||
|
|
||||||
main();
|
main();
|
||||||
requestAnimationFrame(renderThing)
|
requestAnimationFrame(renderThing)
|
7
docs/js/upgrade.js
Normal file
7
docs/js/upgrade.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
document.querySelector('.buy').addEventListener('click', () => {
|
||||||
|
if (nothingness < 10) return;
|
||||||
|
nothingness -= 10;
|
||||||
|
cubePos.push([Math.random() * 1000 - 500, Math.random() * 1000 - 500, Math.random() * 30 - 200,
|
||||||
|
Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random() * 2 - 1
|
||||||
|
])
|
||||||
|
})
|
Loading…
Reference in a new issue