We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e8bcc5 commit 9b34e63Copy full SHA for 9b34e63
timer/hooks.js
@@ -1,6 +1,15 @@
1
export class Hooks {
2
3
hookNewGameButton(callback) {
4
+ if (ig.game && ig.game.start) {
5
+ const original = ig.game.start;
6
+ ig.game.start = (...args) => {
7
+ callback(...args);
8
+ return original.apply(ig.game, args);
9
+ };
10
+ }
11
+
12
13
const buttonNumber = ig.platform === 1 ? 3 : 2;
14
const buttons = simplify.getInnerGui(cc.ig.GUI.menues[15].children[2])[entries.buttons];
15
const newGameButton = buttons[buttonNumber];
timer/package.json
@@ -2,7 +2,7 @@
"name": "timer",
"main": "mod.js",
"module": true,
- "version": "2.1.1",
+ "version": "2.2.0",
"dependencies": {
"ccloader": "^2.7.7",
"Simplify": "^2.0.3"
0 commit comments