fix: fix emojis upgrade
This commit is contained in:
parent
02904a747a
commit
4c782e999c
@ -27,9 +27,12 @@
|
||||
opacity: 0;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
left: 100%;
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
left: 90%;
|
||||
opacity: 0;
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
BIN
assets/img/upgrades/emojis2.png
Normal file
BIN
assets/img/upgrades/emojis2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
15
js/game.js
15
js/game.js
@ -161,14 +161,13 @@ function onResetProgressClick() {
|
||||
// emojis
|
||||
|
||||
function enableEmojis() {
|
||||
const emojis = ['😎', '😆', '😛', '😏', '😔', '🥲', '😔', '😒', '😍', '😃', '🤓', '😊', '😁', '😄'];
|
||||
const upgEmojis = document.getElementById('upg-emojis');
|
||||
upgEmojis.style.display = 'block';
|
||||
|
||||
const emojis = ['😎', '😆', '😛', '😏', '😔', '🥲', '😔', '😒', '😍', '😃', '🤓', '😊', '😁', '😄'];
|
||||
var randomEmoji = emojis[Math.floor(Math.random() * emojis.length)];
|
||||
|
||||
setInterval(() => {
|
||||
mood += 200;
|
||||
const randomEmoji = emojis[Math.floor(Math.random() * emojis.length)];
|
||||
upgEmojis.innerText = randomEmoji;
|
||||
updateMoodCounter();
|
||||
}, 5000);
|
||||
@ -253,7 +252,7 @@ let upgrades = [
|
||||
{
|
||||
id: 'emojis',
|
||||
name: 'Emoji Thruster',
|
||||
description: 'Let the emotions flyyyyyyy +200mood/5s',
|
||||
description: 'Flying emoji +200mood/5s',
|
||||
image: '../assets/img/upgrades/emojis.png',
|
||||
cost: 500,
|
||||
onPurchase: enableEmojis,
|
||||
@ -282,6 +281,14 @@ let upgrades = [
|
||||
cost: 3000,
|
||||
onPurchase: enableMixer,
|
||||
},
|
||||
{
|
||||
id: 'emojis2',
|
||||
name: 'More Emoji Thrusters',
|
||||
description: 'Let the emojis flyyyyyyy +200mood/5s',
|
||||
image: '../assets/img/upgrades/emojis2.png',
|
||||
cost: 4000,
|
||||
onPurchase: enableEmojis,
|
||||
},
|
||||
{
|
||||
id: 'cuteface',
|
||||
name: 'Cuteface',
|
||||
|
Loading…
x
Reference in New Issue
Block a user