Token login is attempted when you tap on the login screen.
If token login is successful, you are redirected to the loading scene.
If token login fails, the login button is activated for manual login.
The ID and password entered on the UI window are used for login and sign-up.
When the response fails, a message is shown after being processed according to each situation.
Checking for duplicate nicknames and modifications are done at the same time through nickname modification.
Duplicates are checked through the 409 duplicate error.
Even if there is no nickname after logging in, the UI is shown to allow nickname modification.
You can configure it in BACKND > Policy Management.
When there is no entry, null is returned and the corresponding message is shown after processing.
The class of each chart is defined in the BackendData.Chart namespace to allow chart information parsing.
Each class has BackendData.Base.Chart as a parent object; the chart is called from the parent object through the BackendChartDataLoad method and each child class's LoadChartDataTemplate(LitJson.JsonData json) configures the parsing method for each piece of data, caching the data with a common logic.
The class identical to the table name is defined in the BackendData.GameData. namespace to allow parsing for game information.
Each class has BackendData.Base.GameData as a parent object; the game information is called from the parent object through the BackendGameDataLoad method and each child class's SetServerDataToLocal(LitJson.JsonData gameDataJson) configures the parsing method for each piece of data, caching the data with a common logic.
If the loaded data does not exist, InitializeData is called to initialize the local data and insert new data.
Carries out the transaction read method in the loading scene.
If there are tables with errors from the game information classes to be read(if the data does not exist in the table), the GetMyData method is called for each table to look up the data.
The method that saves data every 300 seconds is called through the UpdateGameDataTransaction method in BackendManager.
It checks for any changed values in each class in charge of game information. If there are no changes, it does not save the data; if there is only a single piece of data, it calls the Backend.GameData.UpdateV2() method; if there are multiple, it adds them to the transaction list and calls the TransactionWriteV2 method.
All ranking lists are loaded and cached in the loading scene.
When creating the ranking UI, each ranking name is brought from the cached ranking list and shown as a button.
When clicking each button, the uuid of the ranking calls the ranking user list load method and caches the called time.
If the difference between the cached call time and the current time is less than 10 minutes, the cached user list is shown.
If the difference is 10 minutes or more, the ranking user list load method is called.
In BackendManager, the tables used in each ranking are retrieved every 10 minutes for comparison with each table name in the class that manages game information to check for any changes in values and update the ranking.
Admin mail is loaded in the loading scene, and if there is at least one piece of mail to be received, an indication is shown on the in-game mail icon.
GetAdminPostList is called every 10 minutes in BackendManager to check for incoming mail.
Ranking mail is called when the mail UI is activated, and the cached value is used if the difference between the current time and the previous activation time is less than 10 minutes.
Logs on errors are inserted through SendBugReport() in BackendManager.
The StaticManager.UI.AlertUI.OpenErrorUI() method that generates the warning UI also calls this method and collects errors.
When the initialization method(Init) is called in BackendManager, SetErrorHandler registers handlers for project maintenance, 403 error, and the handler that detects access from other devices.
In Update, Backend.ErrorHandler.Poll() is called constantly to allow access to the UI from within the handler as well.