You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
669 B
22 lines
669 B
import { makeDiv } from "../../../core/utils";
|
|
import { BaseHUDPart } from "../base_hud_part";
|
|
import { DynamicDomAttach } from "../dynamic_dom_attach";
|
|
|
|
const memeShowIntervalSeconds = 70 * 60;
|
|
const memeShowDuration = 5;
|
|
|
|
export class HUDCatMemes extends BaseHUDPart {
|
|
createElements(parent) {
|
|
this.element = makeDiv(parent, "ingame_HUD_CatMemes");
|
|
}
|
|
|
|
initialize() {
|
|
this.domAttach = new DynamicDomAttach(this.root, this.element);
|
|
}
|
|
|
|
update() {
|
|
const now = this.root.time.realtimeNow();
|
|
this.domAttach.update(now % memeShowIntervalSeconds > memeShowIntervalSeconds - memeShowDuration);
|
|
}
|
|
}
|