DiscoverTenerife
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
storedPlaceToSend Class Reference

Class that controls the prefab that represent a stored place on the choosing place for make a challenge screen. More...

Inheritance diagram for storedPlaceToSend:

Public Member Functions

void setPanel (GameObject panel)
 Setter of the panel_ property. More...
 
void setData (StoredPlace placeInformation)
 This method sets the representedPlace_ property as the given StoredPlace it also sets the text of the name_, zone_ and type_ gameObjects. More...
 
void chooseThisPlaceAndUpload ()
 This method checks if there is internet connection, if there inst, it shows an error on the toastMessageObject_ gameobject. If there is, it creates a new challenge with the current user as challenger, the represented stored place as place to visit on the challenge and it also calls the uploadFriendChallengesOf method of firebaseHandler class. Then, it shows a toastMessage and then start the destroyAfterSeconds coroutine. More...
 

Static Public Attributes

static bool userCanSelect_ = true
 boolean that controls if the user can select a place to send a challenge to not allow the user send several challenges to the same user meanwhile the destruction animation is being played. More...
 

Private Member Functions

IEnumerator destroyAfterSeconds (int seconds)
 This method wait for the given number of seconds and then it calls the destroyAndAdvice method. More...
 
void destroyAndAdvice ()
 This method destroy this GameObject and notify the friendsPanel object at it is attached to make it adjust his height. More...
 

Private Attributes

GameObject name_
 GameObject that contains the text where the name of the place will be shown. More...
 
GameObject zone_
 GameObject that contains the text where the zone of the place will be shown. More...
 
GameObject type_
 GameObject that contains the text where the type of the place will be shown. More...
 
GameObject toastMessageObject_
 GameObject that contains the toastMessage where the errors and the warings to the user will be shown. More...
 
GameObject panel_
 GameObject that references the panel that this GameObject is attached. More...
 
StoredPlace representedPlace_
 A reference to the stored place that is represented with this prefab. More...
 

Detailed Description

Class that controls the prefab that represent a stored place on the choosing place for make a challenge screen.

Member Function Documentation

◆ chooseThisPlaceAndUpload()

void storedPlaceToSend.chooseThisPlaceAndUpload ( )

This method checks if there is internet connection, if there inst, it shows an error on the toastMessageObject_ gameobject. If there is, it creates a new challenge with the current user as challenger, the represented stored place as place to visit on the challenge and it also calls the uploadFriendChallengesOf method of firebaseHandler class. Then, it shows a toastMessage and then start the destroyAfterSeconds coroutine.

◆ destroyAfterSeconds()

IEnumerator storedPlaceToSend.destroyAfterSeconds ( int  seconds)
private

This method wait for the given number of seconds and then it calls the destroyAndAdvice method.

Parameters
intnumber of seconds that it has to wait.

◆ destroyAndAdvice()

void storedPlaceToSend.destroyAndAdvice ( )
private

This method destroy this GameObject and notify the friendsPanel object at it is attached to make it adjust his height.

◆ setData()

void storedPlaceToSend.setData ( StoredPlace  placeInformation)

This method sets the representedPlace_ property as the given StoredPlace it also sets the text of the name_, zone_ and type_ gameObjects.

Parameters
StoredPlacewith the information of the place that is represented.

◆ setPanel()

void storedPlaceToSend.setPanel ( GameObject  panel)

Setter of the panel_ property.

Parameters
GameObjectthat contains the panel that this object is attached.

Member Data Documentation

◆ name_

GameObject storedPlaceToSend.name_
private

GameObject that contains the text where the name of the place will be shown.

◆ panel_

GameObject storedPlaceToSend.panel_
private

GameObject that references the panel that this GameObject is attached.

◆ representedPlace_

StoredPlace storedPlaceToSend.representedPlace_
private

A reference to the stored place that is represented with this prefab.

◆ toastMessageObject_

GameObject storedPlaceToSend.toastMessageObject_
private

GameObject that contains the toastMessage where the errors and the warings to the user will be shown.

◆ type_

GameObject storedPlaceToSend.type_
private

GameObject that contains the text where the type of the place will be shown.

◆ userCanSelect_

bool storedPlaceToSend.userCanSelect_ = true
static

boolean that controls if the user can select a place to send a challenge to not allow the user send several challenges to the same user meanwhile the destruction animation is being played.

◆ zone_

GameObject storedPlaceToSend.zone_
private

GameObject that contains the text where the zone of the place will be shown.


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