mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Forcing cooldown
Added an option. Button.cooldown(btn, X) where X is a number, forces a one-time cooldown of X seconds for btn.
This commit is contained in:
@@ -70,6 +70,9 @@ var Button = {
|
||||
var cd = btn.data("cooldown");
|
||||
var id = 'cooldown.'+ btn.attr('id');
|
||||
if(cd > 0) {
|
||||
if(typeof option == 'number') {
|
||||
cd = option;
|
||||
}
|
||||
// param "start" takes value from cooldown time if not specified
|
||||
var start, left;
|
||||
switch(option){
|
||||
|
||||
Reference in New Issue
Block a user