Make FSM for Learder Board UI

Leader Board FSM

The first statements include downloading the files uploaded to the web and loading the hashtable

In the last part, add the on button click action to activate the FSM when clicking the reader board button.

Set it as follows to set the security settings of the save file.

Location : Player Prefs

Encryption : AES

Encryption Password : Your Password (Don’t forget)

Compression Type : Gzip

Since there is no file to load and there is an error, start the stats on the first save

When user click the leaderboard button once again load the save file.

Count the hashtable of the loaded save.

Put the loaded information into the array using the hash table get next action

Arrange the array it made in order of score.

The work of generating array information as a UI using array get next action is performed.

After using the hash table get key from value action, delete it, and compare the Player ID to create a Player’s Ranking Information UI if it is the Player ID, and create another Player UI if it is not.

Below is the status information for creating ranking UI of other players.

When creating a UI, the scale should be tailored to the UI using the settings.

When created, it was made to be created under Content.

I used the UI design below.

If you click the exit button, delete the list created under the content to prevent duplicate generation.

Use Destroy Children ( download on ecosystem)

Below are the states for creating top ranking UI for player.

This makes it easy to know what the player is

Below is a list of players in the overall rankings

After generating the entire ranking list information, turn on the ranking panel.

Below is the FSM that allows players to save through events when changing their scores.

Depending on the performance of the cloud server you use, you can decide whether to update in real time or after clearing the stage.

Find the Player ID in the hashtable.

Use Hash Table Contains Key Action.

After finding it, update the score.

I use Hash Table set

If the player ID is not found, it will register as a new one.

Use Hash table add action.

After performing the action, return the button click to the standby state.

Similar Posts