Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Commit d3830c0

Browse files
committed
Add mechahamster details to README.md
Change-Id: I7557bedd47b9eea4912a674cee1aef821106a573
1 parent 3f0a81e commit d3830c0

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

Firebase_Leaderboard/README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ a look at the [Demo Scene][demo-scene] to see one in action right away!
1313
1. [Requirements](#requirements)
1414
1. [Setup](#setup)
1515
1. [Optional: Setup editor restricted access](#optional--setup-editor-restricted-access)
16+
1. [Overview of Scripts](#Overview of Scripts)
1617
1. [Usage](#usage)
1718
1. [Setting up the LeaderboardController](#setting-up-the-leaderboardcontroller)
1819
1. [Using LeaderboardController EventHandlers](#using-leaderboardcontroller-eventhandlers)
@@ -51,6 +52,96 @@ If you choose to use rules that disallow public access, you will need to [config
5152
[restricted-access]: https://firebase.google.com/docs/database/unity/start?authuser=0#optional_editor_setup_for_restricted_access
5253
[firebase-db-rules]: /Firebase_Leaderboard/firebase-db-rules.txt
5354

55+
# Overview of Scripts
56+
To understand how you might customize these scripts for use in your project, start by exploring each script implemented in the Firebase_Leaderboard>Scripts directory, Firebase_Leaderboard>Demo and Mechahamster. Feel free to read through the code in Unity as you orient yourself to these scripts.
57+
<table>
58+
<tr>
59+
<td>Script Name
60+
</td>
61+
<td>Script Purpose
62+
</td>
63+
</tr>
64+
<tr>
65+
<td>Assets>firebase-unity-solutions>Firebase_Leaderboard>Scripts>FirebaseInitializer
66+
</td>
67+
<td>This is a centralized script for initializing FireBase in your project.
68+
<p>
69+
You should not need to modify this script to customize for your game.
70+
</td>
71+
</tr>
72+
<tr>
73+
<td>Assets>firebase-unity-solutions>Firebase_Leaderboard>Scripts>LeaderboardController
74+
</td>
75+
<td>This script creates the Firebase.Leaderboard namespace, which is called by many of the other scripts. It contains the primary logic for the leaderboard and handles keeping the data from Firebase and Unity Game code synchronized by sending events to Firebase and triggering updates in the game when receiving new data.
76+
</td>
77+
</tr>
78+
<tr>
79+
<td>Assets>firebase-unity-solutions>Firebase_Leaderboard>Scripts>TopScoreArgs
80+
</td>
81+
<td>Defines the event arguments which are sent when LeaderboardController invokes TopScoresUpdated.
82+
</td>
83+
</tr>
84+
<tr>
85+
<td>Assets>firebase-unity-solutions>Firebase_Leaderboard>Scripts>UserScoreArgs
86+
</td>
87+
<td>Defines the event arguments which are sent when LeaderboardController invokes UserScoreUpdated.
88+
</td>
89+
</tr>
90+
<tr>
91+
<td>Assets>firebase-unity-solutions>Firebase_Leaderboard>Scripts>UserScore
92+
</td>
93+
<td>Represents a single user score record kept in FirebaseDatabase. By default a user score contains a timestamp, score value, and the User's unique ID. You may modify this class to add fields, but if you remove or change any of the three default fields, you will need to update the logic in LeaderboardController to match.
94+
</td>
95+
</tr>
96+
<tr>
97+
<td>Assets>firebase-unity-solutions>Firebase_Leaderboard>Editor>LeaderboardControllerEditor
98+
</td>
99+
<td>Creates the LeaderBoard interface, allowing the user to set certain variables and paths in the Unity Inspector window.
100+
<p>
101+
</td>
102+
</tr>
103+
<tr>
104+
<td>Assets>firebase-unity-solutions>Firebase_Leaderboard>Demo>DemoUIController
105+
</td>
106+
<td>In the Firebase_Leaderboard DemoScene, this script controls the Demo Interface.
107+
</td>
108+
</tr>
109+
If you update the LeaderBoardController script for your game, you will need to update this script with any new information.
110+
</td>
111+
</tr>
112+
<tr>
113+
<td>Assets>Hamster>Scripts>States>UploadTime
114+
</td>
115+
<td>In Mechahamster, this script creates a class called UploadTime, which manages the transfer of data to Firebase when the user selects the Submit! button at the end of a maze and logs their score.
116+
</td>
117+
</tr>
118+
<tr>
119+
<td>Assets>Hamster>Scripts>States>TopTimes
120+
</td>
121+
<td>In Mechahamster, this script creates a class called TopTime, which manages the top finish times for a level.
122+
</td>
123+
</tr>
124+
<tr>
125+
<td>Assets>Hamster>Scripts>Menus>TopTimesGUI
126+
</td>
127+
<td>In Mechahamster, this script creates an Interface class for providing code access to the GUI elements in the high score menu.
128+
</td>
129+
</tr>
130+
<tr>
131+
<td>Assets>Hamster>Scripts>States>LevelFinished
132+
</td>
133+
<td>In Mechahamster, this script creates a class called LevelFinished, which manages the logic driving the Level Finished menu page.
134+
</td>
135+
</tr>
136+
<tr>
137+
<td>Assets>Hamster>Scripts>Menus>LevelFinishedGUI
138+
</td>
139+
<td>In Mechahamster, this script creates an Interface class for providing code access to the GUI elements in the Level Finished menu.
140+
</td>
141+
</tr>
142+
</table>
143+
144+
54145
# Usage
55146

56147
## Setting up the LeaderboardController

0 commit comments

Comments
 (0)