This class controls the prefab that shows the information of one of the current user's challenge.
More...
|
void | setChallengeData (challengeData challenge) |
| This method is the setter of the challenge_ property. It also puts the filled_ property as false and call the fillFields method. More...
|
|
void | setPanel (GameObject panel) |
| Setter of the panel_ property. More...
|
|
void | deleteThisChallenge () |
| This method delete this challenge and disattached it from the panel that is attached. The first time its called it makes a toastMessage warning the user that it will remove this challenge, if the user confirms the removing touching again on the button, this method destroy this game object and calls elementDeleted method of challengesPanelController, destroyChallengeByChallengerId of UserData and writeUserData from firebaseHandler. More...
|
|
|
void | Awake () |
| This method is called before the first frame. It initialices the: userWasWarned_, filled_ and challenge_ properties, and it sets the placeName_, placeZone_, expireDate_ and challenger_ text as the correspondent default ones. More...
|
|
void | Update () |
| This method is called each frame. It only checks if the filled_ property is false, it that is the case it calls the fillFields method. In other case this method dont do nothing. More...
|
|
void | fillFields () |
| This method checks if the friendDataIsComplete method of UserData is true and if the challenge_ is not null, it sets all the texts of the prefab and also sets the filled_ property as true. If both contitions are not true, this method dont do nothing. More...
|
|
This class controls the prefab that shows the information of one of the current user's challenge.
◆ Awake()
void challengePrefabController.Awake |
( |
| ) |
|
|
private |
This method is called before the first frame. It initialices the: userWasWarned_, filled_ and challenge_ properties, and it sets the placeName_, placeZone_, expireDate_ and challenger_ text as the correspondent default ones.
◆ deleteThisChallenge()
void challengePrefabController.deleteThisChallenge |
( |
| ) |
|
This method delete this challenge and disattached it from the panel that is attached. The first time its called it makes a toastMessage warning the user that it will remove this challenge, if the user confirms the removing touching again on the button, this method destroy this game object and calls elementDeleted method of challengesPanelController, destroyChallengeByChallengerId of UserData and writeUserData from firebaseHandler.
◆ fillFields()
void challengePrefabController.fillFields |
( |
| ) |
|
|
private |
This method checks if the friendDataIsComplete method of UserData is true and if the challenge_ is not null, it sets all the texts of the prefab and also sets the filled_ property as true. If both contitions are not true, this method dont do nothing.
◆ setChallengeData()
void challengePrefabController.setChallengeData |
( |
challengeData |
challenge | ) |
|
This method is the setter of the challenge_ property. It also puts the filled_ property as false and call the fillFields method.
- Parameters
-
challengeData | object that contains all the information of the represented challenge. |
◆ setPanel()
void challengePrefabController.setPanel |
( |
GameObject |
panel | ) |
|
Setter of the panel_ property.
- Parameters
-
GameObject | that contains the panel that this object is attached. |
◆ Update()
void challengePrefabController.Update |
( |
| ) |
|
|
private |
This method is called each frame. It only checks if the filled_ property is false, it that is the case it calls the fillFields method. In other case this method dont do nothing.
◆ challenge_
challengeData object that contains all the information of the challenge that will be shown.
◆ challenger_
GameObject challengePrefabController.challenger_ |
|
private |
GameObject that shows the player that sended this challenge.
◆ challengerDefaultText_
string challengePrefabController.challengerDefaultText_ = "Challenger:" |
|
private |
string that contains the default text of the text that will shown the name of the user that sended this challenge.
◆ expireDate_
GameObject challengePrefabController.expireDate_ |
|
private |
GameObject that shows the challenge's expire date.
◆ expireDateDefaultText_
string challengePrefabController.expireDateDefaultText_ = "Expire Date:\n" |
|
private |
string that contains the default text of the text that will shown the challenge's expire date.
◆ filled_
bool challengePrefabController.filled_ |
|
private |
true if the prefab is showing the challenge's information.
◆ panel_
GameObject challengePrefabController.panel_ |
|
private |
GameObject that references the panel that this GameObject is attached.
◆ placeName_
GameObject challengePrefabController.placeName_ |
|
private |
GameObject that shows the name of the challenge's place.
◆ placeNameDefaultText_
string challengePrefabController.placeNameDefaultText_ = "" |
|
private |
string that contains the default text of the text that will shown the place's name.
◆ placeZone_
GameObject challengePrefabController.placeZone_ |
|
private |
GameObject that shows the name of the challenge's place.
◆ placeZoneDefaultText_
string challengePrefabController.placeZoneDefaultText_ = "Zone:" |
|
private |
string that contains the default text of the text that will shown the place's zone.
◆ toastMessage_
GameObject challengePrefabController.toastMessage_ |
|
private |
GameObject that contains the toastMessage that will shown the error messages to the user.
◆ userWasWarned_
bool challengePrefabController.userWasWarned_ |
|
private |
true if the user was warned before deleting the challenge.
The documentation for this class was generated from the following file: