forked from rDrama/rDrama
reduced the number of bugs and fireflies on mobile
parent
5a9966b74e
commit
24d93f7ab9
|
@ -1,7 +1,7 @@
|
|||
new BugController({
|
||||
imageSprite: "/i/fly-sprite.webp",
|
||||
canDie: false,
|
||||
minBugs: 10,
|
||||
maxBugs: 20,
|
||||
minBugs: MINFLIES,
|
||||
maxBugs: MAXFLIES,
|
||||
mouseOver: "multiply"
|
||||
});
|
||||
});
|
||||
|
|
|
@ -417,15 +417,25 @@ function logout(t) {
|
|||
});
|
||||
}
|
||||
|
||||
const width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
|
||||
const screen_width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
|
||||
function focusSearchBar(element)
|
||||
{
|
||||
if (width >= 768) {
|
||||
if (screen_width >= 768) {
|
||||
element.focus();
|
||||
}
|
||||
}
|
||||
|
||||
let MINFLIES;
|
||||
let MAXFLIES;
|
||||
|
||||
if (screen_width < 768) {
|
||||
MINFLIES = 5;
|
||||
MAXFLIES = 10;
|
||||
}
|
||||
else {
|
||||
MINFLIES = 10;
|
||||
MAXFLIES = 20;
|
||||
}
|
||||
|
||||
function insertText(input, text) {
|
||||
const newPos = input.selectionStart + text.length;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
new BugController({
|
||||
imageSprite: "/i/fireflies.webp",
|
||||
canDie: false,
|
||||
minBugs: 10,
|
||||
maxBugs: 20,
|
||||
minBugs: MINFLIES,
|
||||
maxBugs: MAXFLIES,
|
||||
mouseOver: "multiply"
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,9 +7,6 @@ const YOFFSET = 37;
|
|||
// chance of generating a new bug each second if not bugmaxxed
|
||||
const BUGCHANCEPERSEC = 0.5;
|
||||
|
||||
// bug quantities
|
||||
const MINFLIES = 5;
|
||||
const MAXFLIES = 25;
|
||||
const MINSPIDERS = 1;
|
||||
const MAXSPIDERS = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue