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