#
Baseball
Tips
- SudMGP ensures that the status is serialized and delivered in order from MG to APP.
- Notifications can be repeated, and there is no need to guarantee the number of notifications.
- After the notification, SudMGP will cache the latest data value based on the state, allowing the APP to retrieve it at any time.
1. Set Default State of Interface (Baseball)
- state
mg_baseball_defualt_state
- data
{}
- Description
Game client notifies the app to set the default state of the interface.
2. Preparation is complete (Baseball)
- state
mg_baseball_prepare_finish
- data
{}
- Description
The game client notifies the app that the preparation is complete.
3. The main interface is now displayed (Baseball)
- state
mg_baseball_show_game_scene
- data
{}
- Description
The game client has notified the app that the main interface is now displayed (Baseball)
4. The game client has notified the app that the main interface is now hidden (Baseball)
- state
mg_baseball_hide_game_scene
- data
{}
- Description
The game client has notified the app that the main interface is now hidden (Baseball)
5. To query the ranks data (Baseball)
- state
mg_baseball_ranking
- data
{
"page": 1, // pageIndex
"size": 4 // count of per page
}
- Description
The game client notifies the app to query leaderboard data
6. Querying my ranking (baseball)
- state
mg_baseball_my_ranking
- data
{}
- Description
The game client notifies the app to query my ranking
7. The game client notifies the app to query the data of players before and after me in the current distance (Baseball)
- state
mg_baseball_range_info
- data
{
"distance": 100 // distance
}
- Description
The game client notifies the app to query the data of players before and after me in the current distance, excluding myself.
8. Set the clickable area provided by the app for the game (baseball)
Coordinate system origin: Top-left corner, measured in pixels- state
mg_baseball_set_click_rect
- data
{
"list": [
{
"x": number, // can touch area x, top left
"y": number, // can touch area y, top left
"width": number, // can touch area width
"height": number // can touch area height
}
]
}
- Description
Game client notifies the app to set clickable area
9. Retrieve Text Configuration Data (Baseball)
- state
mg_baseball_text_config
- data
{}
- Description
Retrieve Text Configuration Data
10. Ball landed, notify distance (Baseball)
- state
mg_baseball_send_distance
- data
{
"distances": [100, 10,...]
}
- Description
Ball landed, notify distance