* @static shouldProceed - Either when the user clicks in the game to proceed or * the autoPlay feature is ready to go on, Monogatari will first check with * all actions if it's ok to proceed. Every action should implement its own * logic for it according to its requirements. * * @param {Ob
(_options?: { userInitiated?: boolean; skip?: boolean; autoPlay?: boolean })
| 147 | * @return {Promise} - Resolved if proceeding is alright or rejected if its not |
| 148 | */ |
| 149 | static async shouldProceed (_options?: { userInitiated?: boolean; skip?: boolean; autoPlay?: boolean }): Promise<void[] | void> { |
| 150 | const promises: Promise<void>[] = []; |
| 151 | |
| 152 | this.instances((instance: any) => { |
| 153 | promises.push(instance.shouldProceed()); |
| 154 | }); |
| 155 | |
| 156 | return Promise.all(promises); |
| 157 | } |
| 158 | |
| 159 | /** |
| 160 | * @static willProceed - Once the shouldProceed check is passed, each action |