Start your game until end

Set β€œStart Game” Button Click Event Callback

After the progress bar has finished loading, the player can start the game by clicking the β€œStart” button on the page.

The game frontend needs to place the game start logic code within the callback function to handle this event.

MINITONSDK.setStartGameButtonCallbak(callback);

Parameters

ParameterTypeDescription

callback

Function

The callback function for the "Start Game" button click event. This function contains the logic to start the game when the player clicks the button.

Return

none

Example

MINITONSDK.setStartGameButtonCallbak(() => {
    ...
});

Set the Game Over

This function should be called by the frontend when the player's game ends. It ensures that the game-over state is properly handled in frontend.

Backend still need call end_game information to MiniTon, though frontend called following function.

MINITONSDK.setGameOver();

Parameters:

None

Return:

None

Last updated

Contact us

Telegram

©️MiniTon 2023