class that controls the panel element that represent one of the current user friends.
More...
|
void | setData (FriendData friendData) |
| The constructor of the class. It sets the userWasNotified_ as false, it sets the shown text as the display name of the user and the correspondent range icon. More...
|
|
void | setPanel (GameObject panel) |
| Setter of the panel_ property. More...
|
|
void | chanllegeFriend () |
| This method first, it checks if there is internet connection. If there isnt, it shows a toastMessage with an error. If there is internet connection but the represented friend already has a challenge of the current user, it shows a toastmessage with the error. And if there is internet connection and the represented user doesnt have a challenge of the current user it sets the chosenFriend_ static property to a reference to the friendData_ attribute and then calls the changeScene method of ChangeScene and send the user to the choosing place for the challenge that will be sended screen. More...
|
|
void | deleteFriend () |
| this method deletes the friendship relationship if there is internet connection. Before deleting the friendship relationship it notify the user to make him aware of what he is doing. More...
|
|
string | getName () |
| getter of the display name of the represented user. More...
|
|
string | getUid () |
| getter of the user id of the represented user. More...
|
|
FriendData | getFriendData () |
| Getter of the friendData_ property. More...
|
|
void | chooseThisFriendAndUpload () |
| This method if there is internet connection, selects the represented friend to be challenged, creates a new challenge on the selected friend, calls the uploadFriendChallengesOf method of firebaseHandler class, advise the user with a toastmessage and then, destroy this GameObject. If there is no internet connection it simply shows a toastmessage telling the user that it needs internet connection to challenge his friend successfully. More...
|
|
|
GameObject | toastMessageObject_ |
| GameObject that references the toastMessage object that will shown the information to the user. More...
|
|
GameObject | displayName_ |
| GameObject that has the text where the displayName will be shown. More...
|
|
GameObject | panel_ |
| GameObject that references the panel that this GameObject is attached. More...
|
|
FriendData | friendData_ |
| Reference to a FriendData object that contains all the information of the shown friend. More...
|
|
bool | userWasNotified_ |
| True if the user was notified about he is erasing a friend, false if you have to notify the user before deleting this friend. More...
|
|
GameObject | rangeImage_ |
| GameObject that contains the image of the represented player's range. More...
|
|
GameObject | range_ |
| GameObject that contains the text where the range name of the current player will be shown. More...
|
|
class that controls the panel element that represent one of the current user friends.
◆ chanllegeFriend()
void Friend.chanllegeFriend |
( |
| ) |
|
This method first, it checks if there is internet connection. If there isnt, it shows a toastMessage with an error. If there is internet connection but the represented friend already has a challenge of the current user, it shows a toastmessage with the error. And if there is internet connection and the represented user doesnt have a challenge of the current user it sets the chosenFriend_ static property to a reference to the friendData_ attribute and then calls the changeScene method of ChangeScene and send the user to the choosing place for the challenge that will be sended screen.
◆ chooseThisFriendAndUpload()
void Friend.chooseThisFriendAndUpload |
( |
| ) |
|
This method if there is internet connection, selects the represented friend to be challenged, creates a new challenge on the selected friend, calls the uploadFriendChallengesOf method of firebaseHandler class, advise the user with a toastmessage and then, destroy this GameObject. If there is no internet connection it simply shows a toastmessage telling the user that it needs internet connection to challenge his friend successfully.
◆ deleteFriend()
void Friend.deleteFriend |
( |
| ) |
|
this method deletes the friendship relationship if there is internet connection. Before deleting the friendship relationship it notify the user to make him aware of what he is doing.
◆ destroyAfterSeconds()
IEnumerator Friend.destroyAfterSeconds |
( |
int |
seconds | ) |
|
|
private |
This method wait for the given number of seconds and then it calls the destroyAndAdvice method.
- Parameters
-
int | number of seconds that it has to wait. |
◆ destroyAndAdvice()
void Friend.destroyAndAdvice |
( |
| ) |
|
|
private |
This method destroy this GameObject and notify the friendsPanel object at it is attached to make it adjust his height.
◆ getFriendData()
Getter of the friendData_ property.
- Returns
- The FriendData object that is on the friendData_ attribute.
◆ getName()
string Friend.getName |
( |
| ) |
|
getter of the display name of the represented user.
- Returns
- string that contains the display name of the user.
◆ getUid()
getter of the user id of the represented user.
- Returns
- string that contains the user id of the user.
◆ setData()
The constructor of the class. It sets the userWasNotified_ as false, it sets the shown text as the display name of the user and the correspondent range icon.
- Parameters
-
the | FriendData object that contains all the information of the represented user. |
◆ setPanel()
void Friend.setPanel |
( |
GameObject |
panel | ) |
|
Setter of the panel_ property.
- Parameters
-
GameObject | that contains the panel that this object is attached. |
◆ displayName_
GameObject Friend.displayName_ |
|
private |
GameObject that has the text where the displayName will be shown.
◆ friendData_
Reference to a FriendData object that contains all the information of the shown friend.
◆ panel_
GameObject that references the panel that this GameObject is attached.
◆ range_
GameObject that contains the text where the range name of the current player will be shown.
◆ rangeImage_
GameObject Friend.rangeImage_ |
|
private |
GameObject that contains the image of the represented player's range.
◆ toastMessageObject_
GameObject Friend.toastMessageObject_ |
|
private |
GameObject that references the toastMessage object that will shown the information to the user.
◆ userWasNotified_
bool Friend.userWasNotified_ |
|
private |
True if the user was notified about he is erasing a friend, false if you have to notify the user before deleting this friend.
The documentation for this class was generated from the following file: