mirror of
https://github.com/zyllian/zyllian.github.io.git
synced 2025-01-18 03:32:30 -08:00
disable interaction buttons on cooldown
This commit is contained in:
parent
63b4358743
commit
3c3e374fd5
1 changed files with 6 additions and 0 deletions
|
@ -449,8 +449,10 @@
|
|||
return;
|
||||
}
|
||||
canFeed = false;
|
||||
feedButton.disabled = true;
|
||||
setTimeout(() => {
|
||||
canFeed = true;
|
||||
feedButton.disabled = false;
|
||||
}, FEED_TIMER);
|
||||
|
||||
pet.feed(38);
|
||||
|
@ -461,8 +463,10 @@
|
|||
return;
|
||||
}
|
||||
canPet = false;
|
||||
petButton.disabled = true;
|
||||
setTimeout(() => {
|
||||
canPet = true;
|
||||
petButton.disabled = false;
|
||||
}, PET_TIMER);
|
||||
|
||||
pet.pet();
|
||||
|
@ -473,8 +477,10 @@
|
|||
return;
|
||||
}
|
||||
canClean = false;
|
||||
cleanButton.disabled = true;
|
||||
setTimeout(() => {
|
||||
canClean = true;
|
||||
cleanButton.disabled = false;
|
||||
}, CLEAN_TIMER);
|
||||
|
||||
pet.clean();
|
||||
|
|
Loading…
Add table
Reference in a new issue