DiscoverTenerife
Private Member Functions | Private Attributes | List of all members
currentZoneScoreController Class Reference

Class that shows the current zone current user's score. More...

Inheritance diagram for currentZoneScoreController:

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...
 

Detailed Description

Class that shows the current zone current user's score.

Member Function Documentation

◆ Awake()

void currentZoneScoreController.Awake ( )
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.

◆ Update()

void currentZoneScoreController.Update ( )
private

This method is called on each frame, it checks the following conditions:

If all the conditions are true, it calls the updateZoneData method.

◆ updateZoneData()

void currentZoneScoreController.updateZoneData ( )
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.

Member Data Documentation

◆ firebaseHandlerObject_

firebaseHandler currentZoneScoreController.firebaseHandlerObject_
private

store a reference to the firebaseHandler instance.

◆ gpsController_

gpsController currentZoneScoreController.gpsController_
private

store a reference to the gpsController.

◆ lastZone_

string currentZoneScoreController.lastZone_
private

stores the last zone that the user was, for optimization reasons.

◆ textObject_

GameObject currentZoneScoreController.textObject_
private

GameObject that contains the text where the score will be showed.


The documentation for this class was generated from the following file: