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

Class that control one of the parts of the map that shown the proportion of places visited by the current user. More...

Inheritance diagram for mapPartHandler:

Private Member Functions

void Awake ()
 This method is called before the first frame. It initialice the firebaseHandlerObject_ property and if both placesAreReady and userDataIsReady return true, it calls loadData method, it sets the dataLoaded_ to false in other case. More...
 
void Update ()
 This method is called each frame. If dataLoaded_ is false and both placesAreReady and userDataIsReady return true, it calls loadData method,. More...
 
void loadData ()
 This method calculate the proportion of visited places of the determined zone. Then it changes the text that is shown on the part of the map and the proportion of the background image that is filled. It also puts the dataLoaded_ property as true. IMPORTANT NOTE: THE ZONE IS DETERMINED BY THE NAME OF THE GAMEOBJECT THAT THIS SCRIPT IS ATTACHED. More...
 

Private Attributes

GameObject percentage_
 GameObject that has the text that shows he percentage of how many place of that zone the current user has visited already. More...
 
GameObject image_
 GameObject that has the image that shows visually the proportion of places visited. More...
 
firebaseHandler firebaseHandlerObject_
 Reference to the firebaseHandler instance. More...
 
bool dataLoaded_
 True if the data was already loaded, false in other case. More...
 

Detailed Description

Class that control one of the parts of the map that shown the proportion of places visited by the current user.

Member Function Documentation

◆ Awake()

void mapPartHandler.Awake ( )
private

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

◆ loadData()

void mapPartHandler.loadData ( )
private

This method calculate the proportion of visited places of the determined zone. Then it changes the text that is shown on the part of the map and the proportion of the background image that is filled. It also puts the dataLoaded_ property as true. IMPORTANT NOTE: THE ZONE IS DETERMINED BY THE NAME OF THE GAMEOBJECT THAT THIS SCRIPT IS ATTACHED.

◆ Update()

void mapPartHandler.Update ( )
private

This method is called each frame. If dataLoaded_ is false and both placesAreReady and userDataIsReady return true, it calls loadData method,.

Member Data Documentation

◆ dataLoaded_

bool mapPartHandler.dataLoaded_
private

True if the data was already loaded, false in other case.

◆ firebaseHandlerObject_

firebaseHandler mapPartHandler.firebaseHandlerObject_
private

Reference to the firebaseHandler instance.

◆ image_

GameObject mapPartHandler.image_
private

GameObject that has the image that shows visually the proportion of places visited.

◆ percentage_

GameObject mapPartHandler.percentage_
private

GameObject that has the text that shows he percentage of how many place of that zone the current user has visited already.


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