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

class that controls he panels that show the current user stats. More...

Inheritance diagram for statsController:

Private Member Functions

void Awake ()
 This method is called before the first frame, it instantiate the firebaseHandlerObject_ property and checks if both placesAreReady and userDataIsReady method of firebaseHandler return true it calls loadData method, in other case it sets the dataLoaded_ property to false. More...
 
void Update ()
 This method is called once on each frame. If the data isnt loaded and both placesAreReady and userDataIsReady methods of firebaseHandler class returns true it calls the loadData method. More...
 
void loadData ()
 Update the data of all the panels that shows the current user's stats using the getters of UserData class. It also changes the dataLoaded_ to true. More...
 

Private Attributes

GameObject[] infoPanels_
 Array with all the GameObjects that shows the different stats of the current user. More...
 
firebaseHandler firebaseHandlerObject_
 Reference to the firebaseHandler object. More...
 
bool dataLoaded_
 True if the current user's scores is already loaded, false in other case. More...
 

Detailed Description

class that controls he panels that show the current user stats.

Member Function Documentation

◆ Awake()

void statsController.Awake ( )
private

This method is called before the first frame, it instantiate the firebaseHandlerObject_ property and checks if both placesAreReady and userDataIsReady method of firebaseHandler return true it calls loadData method, in other case it sets the dataLoaded_ property to false.

◆ loadData()

void statsController.loadData ( )
private

Update the data of all the panels that shows the current user's stats using the getters of UserData class. It also changes the dataLoaded_ to true.

◆ Update()

void statsController.Update ( )
private

This method is called once on each frame. If the data isnt loaded and both placesAreReady and userDataIsReady methods of firebaseHandler class returns true it calls the loadData method.

Member Data Documentation

◆ dataLoaded_

bool statsController.dataLoaded_
private

True if the current user's scores is already loaded, false in other case.

◆ firebaseHandlerObject_

firebaseHandler statsController.firebaseHandlerObject_
private

Reference to the firebaseHandler object.

◆ infoPanels_

GameObject [] statsController.infoPanels_
private

Array with all the GameObjects that shows the different stats of the current user.


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