DiscoverTenerife
|
Class that shows the current zone current user's score. More...
Private Member Functions | |
void | Awake () |
This method is called on the first frame, it initializes each property and if all FirebaseDependenciesAreResolved, userDataIsReady and placesAreReady methods of firebaseHandler class returned true, it calls the updateZoneData method. More... | |
void | Update () |
void | updateZoneData () |
Private Attributes | |
GameObject | textObject_ |
GameObject that contains the text where the score will be showed. More... | |
gpsController | gpsController_ |
store a reference to the gpsController. More... | |
firebaseHandler | firebaseHandlerObject_ |
store a reference to the firebaseHandler instance. More... | |
string | lastZone_ |
stores the last zone that the user was, for optimization reasons. More... | |
Class that shows the current zone current user's score.
|
private |
This method is called on the first frame, it initializes each property and if all FirebaseDependenciesAreResolved, userDataIsReady and placesAreReady methods of firebaseHandler class returned true, it calls the updateZoneData method.
|
private |
This method is called on each frame, it checks the following conditions:
If all the conditions are true, it calls the updateZoneData method.
|
private |
If the current zone is valid, it calls countOfVisitedPlacesOfZone method of UserData class with the current zone and it calls the totalOfPlacesOfZone method of firebaseHandler class with the current zone. Then, calculates the porportion of visited and update the text and the fillAmount properties for show the score of the current zone.
|
private |
store a reference to the firebaseHandler instance.
|
private |
store a reference to the gpsController.
|
private |
stores the last zone that the user was, for optimization reasons.
|
private |
GameObject that contains the text where the score will be showed.