public void SetupFeedItem(string[] _itemData, OnPopupPageOpen _pageToOpen) { themeFont = ChangeColourScheme.GetCurrentFont(); foreach (FontChanger f in GetComponentsInChildren <FontChanger> ()) { f.ChangeMyFont(themeFont); } challengeName.text = _itemData [3]; skill1.text = _itemData [4]; skill2.text = _itemData [5]; skill3.text = _itemData [6]; rewardPoints.text = _itemData [11] + " points"; challengeIcon.sprite = DummyPullDataFromID.GetChallengeImage(_itemData [0]); if (_itemData [13] == "true") { bgColour.color = Color.white; } else { bgColour.color = new Color32(255, 174, 174, 255); } listener.SetResource(_itemData); listener.SetPageToOpen(_pageToOpen); }
public void UpdatePoints() { int points = 0; int.TryParse(DummyPullDataFromID.PullPersonalRewardPoints(), out points); StartCoroutine(CountUp(points)); }
public void SaveFeedback() { bool allVerified = true; foreach (FeedbackItem f in feedbackItems) { if (f.VerifyItem() == false) { allVerified = false; } } if (allVerified == false) { return; } foreach (FeedbackItem f in feedbackItems) { DummyPullDataFromID.AddFeedback(f.GetFeedbackData()); } DummyPullDataFromID.MarkChallengeAsComplete(challengeID); GetComponent <OnPopupPageOpen> ().ForceExit(); }
public void SaveChanges() { List <string> returnList = new List <string> (); returnList.Add(myData [0]); for (int i = 0; i < textInputBoxes.Length; i++) { if (textInputBoxes [i].text == null || textInputBoxes [i].text == "") { returnList.Add(myData [i + 1]); } else { returnList.Add(textInputBoxes [i].text); } textInputBoxes [i].text = ""; } returnList.Add(myData [8]); returnList.Add(myData [9]); DummyPullDataFromID.UpdatePersonalInfo(returnList.ToArray()); profile.FillInformation(); gameObject.GetComponent <OnPopupPageOpen> ().ForceExit(); }
public void FillInformation() { myInformation = DummyPullDataFromID.PullPersonalInformation(); name.text = myInformation [1]; skillOne.text = myInformation [2]; skillTwo.text = myInformation [3]; skillThree.text = myInformation [4]; interestOne.text = myInformation [5]; interestTwo.text = myInformation [6]; interestThree.text = myInformation [7]; editProfileButton.SetResource(myInformation); int points = 0; int.TryParse(myInformation[8], out points); StartCoroutine(CountUpPoints(points)); float rating = 0; float.TryParse(myInformation[9], out rating); StartCoroutine(CountUpRating(rating)); }
public void FillData(string[] _resource, AccountType _viewChallengePageType) { resID = _resource [0]; challengeTitle.text = _resource [3]; skillOne.text = _resource [4]; skillTwo.text = _resource [5]; SkillThree.text = _resource [6]; challengeDescription.text = _resource [7]; challengeDate.text = _resource [8]; challengeDeadline.text = _resource [9]; challengerName.text = _resource [10]; challengeIcon.sprite = DummyPullDataFromID.GetChallengeImage(_resource [0]); listener.SetResource(_resource); if (_viewChallengePageType == AccountType.Youth) { SortYouthButtons(_resource); } else if (_viewChallengePageType == AccountType.Challenger) { SortChallengerButtons(_resource); } else if (_viewChallengePageType == AccountType.Admin) { } }
public void AcceptReward() { string ID = GetComponent <FillRewardItems> ().GetID(); DummyPullDataFromID.RemoveReward(ID); refreshScript.UpdatePoints(); }
public void SetupPage() { ClearEverything(); myData = DummyPullDataFromID.PullMyChallengerInfo(); challengerName.text = myData [1]; }
public void FillData(string[] _myData) { myData = _myData; name.text = _myData [1]; email.text = _myData [2]; phone.text = _myData [3]; description.text = _myData [4]; profilePic.sprite = DummyPullDataFromID.GetChallengerProfileImage(_myData [0]); }
public void FillInformation(string _challengerID) { string[] resource = DummyPullDataFromID.PullChallengerInfoByString(_challengerID); name.text = resource [1]; email.text = resource [2]; number.text = resource [3]; description.text = resource [4]; profilePic.sprite = DummyPullDataFromID.GetChallengerProfileImage(resource [0]); }
public void AcceptChallenge() { if (resource != null) { DummyPullDataFromID.UpdateData(resource [0], 1, "true"); DummyPullDataFromID.AddToAcceptedChallenges(resource [0]); } else { Debug.Log("Resource empty @ DummyAcceptChallenge"); } }
public string[] GetFeedbackData() { string[] feedbackData = new string[] { challengeInfo[0], youthID, textFeedbackInput.text, ratingInput.text, DummyPullDataFromID.PullMyChallengerInfo()[0], challengeInfo[3] }; return(feedbackData); }
public void OptOut() { if (resource != null) { DummyPullDataFromID.UpdateData(resource [0], 1, "false"); DummyPullDataFromID.RemoveFromAcceptedChallenges(resource [0]); } else { Debug.Log("Resource empty @ DummyOptOut"); } }
public void FillInformation() { myInformation = DummyPullDataFromID.PullMyChallengerInfo(); name.text = myInformation [1]; email.text = myInformation [2]; number.text = myInformation [3]; description.text = myInformation [4]; profilePic.sprite = DummyPullDataFromID.GetChallengerProfileImage(myInformation [0]); editProfileButton.SetResource(myInformation); }
public void CanRedeem() { int tempRewardPoints = int.Parse(DummyPullDataFromID.PullPersonalInformation() [8]); Debug.Log("Mine: " + tempRewardPoints + ", target: " + rewardCost); if (tempRewardPoints >= rewardCost) { GetComponent <ClickForDialogueBox> ().SetupDialogue(); } else { GetComponent <ClickForInformationBox> ().SetupInfo(); } }
public void SortChallengerButtons(string[] _resource) { foreach (GameObject g in DisplayButtons) { g.SetActive(false); } if (_resource [13] == "true" && DummyPullDataFromID.HasChallengeBeenAccepted(_resource[0]) && _resource [2] == "false") { DisplayButtons [4].SetActive(true); DisplayButtons [4].GetComponent <ClickForPopupPage> ().SetResource(_resource); } DisplayButtons [3].SetActive(true); DisplayButtons [3].GetComponent <ClickForPopupPage> ().SetResource(_resource); }
public void FillData(string[] _resource) { myData = _resource; ClearEverything(); challengeTitle.text = _resource[3]; challengerName.text = _resource[10]; skill1.text = _resource[4]; skill2.text = _resource[5]; skill3.text = _resource[6]; challengeDate.text = _resource[8]; challengeDeadline.text = _resource[9]; description.text = _resource[7]; challengePic.sprite = DummyPullDataFromID.GetChallengeImage(_resource [0]); }
public void FillItems(string[] _rewardData, GameObject _parentScrollRect) { themeFont = ChangeColourScheme.GetCurrentFont(); foreach (FontChanger f in GetComponentsInChildren <FontChanger> ()) { f.ChangeMyFont(themeFont); } rewardID = _rewardData [0]; rewardTitle.text = _rewardData [1]; rewardDescription.text = _rewardData [2]; rewardPoints.text = _rewardData [3]; rewardCost = int.Parse(_rewardData [3]); rewardImage.sprite = DummyPullDataFromID.GetRewardImage(_rewardData [0]); GetComponent <OnClickHandler> ().SetParentScrollRect(_parentScrollRect); }
void Start() { for (int s = 0; s < challengeImages.Length; s++) { DummyPullDataFromID.SetChallengeImage(challengeImages [s], IDsForChallengeImages [s]); } for (int s = 0; s < challengerProfileImages.Length; s++) { DummyPullDataFromID.SetChallengerProfileImage(challengerProfileImages [s], IDsForChallengerProfileImages [s]); } for (int s = 0; s < rewardImages.Length; s++) { Debug.Log(s); DummyPullDataFromID.SetRewardImage(rewardImages [s], IDsForRewardImages [s]); } }
private void FillData() { switch (pageType) { case PageType.CHALLENGER_PROFILE: gameObject.GetComponent <DummyChallengerProfile> ().FillInformation(resource[12]); triggerExitEvent = new exitEvent(RefreshSecondaryPage); break; case PageType.CHALLENGE_INFO: gameObject.GetComponent <DummyChallengeInfo> ().FillData(resource, DummyPullDataFromID.GetActiveAccountType()); triggerExitEvent = new exitEvent(RefreshMasterPage); break; case PageType.EDIT_PROFILE: gameObject.GetComponent <DummyEditInformation> ().FillData(resource); gameObject.GetComponent <DummyEditInformation> ().ToggleSavebutton(true); triggerExitEvent = new exitEvent(ExitEditProfile); break; case PageType.CHALLENGER_EDIT_PROFILE: gameObject.GetComponent <DummyEditChallengerProfile> ().FillData(resource); gameObject.GetComponent <DummyEditChallengerProfile> ().ToggleSavebutton(true); triggerExitEvent = new exitEvent(ExitChallengerEditProfile); break; case PageType.CHALLENGER_EDIT_CHALLENGE: gameObject.GetComponent <DummyEditChallenge> ().FillData(resource); triggerExitEvent = new exitEvent(ExitChallengerEditChallenge); break; case PageType.CHALLENGER_NEW_CHALLENGE: gameObject.GetComponent <DummyAddChallenge> ().SetupPage(); triggerExitEvent = new exitEvent(RefreshMasterPage); break; case PageType.CHALLENGER_LEAVE_FEEDBACK: gameObject.GetComponent <LeaveFeedback> ().FillData(resource, DummyPullDataFromID.PullPersonalInformation()[0]); triggerExitEvent = new exitEvent(RefreshSecondaryPage); break; } anim.SetInteger("Show", 1); }
private void PullChallengerUpcoming() { displayedItems = DummyPullDataFromID.GetChallengerUpcoming(); }
private void PullCompleted() { displayedItems = DummyPullDataFromID.PullCompleted(); }
public void RefreshResource() { resource = DummyPullDataFromID.PullArrayByID(resource [0]); }
private void PullFeedback() { displayedItems = DummyPullDataFromID.PullFeedback(); }
private void PullRewards() { displayedItems = DummyPullDataFromID.PullRewards(); }
void Start() { DummyPullDataFromID.SetTestImage(testImage); }
private void PullChallengerCompleted() { displayedItems = DummyPullDataFromID.GetChallengerCompleted(); }
public void FillFeedbackPanel(string _challengeID) { feedbackPanel.FillItems(DummyPullDataFromID.PullFeedbackByChallenge(_challengeID)); }
public void SetChallengerID(string _ID) { DummyPullDataFromID.SetChallengerID(_ID); splashPage.RefreshFeed(); DummyPullDataFromID.SetActiveAccountType(AccountType.Challenger); }
public void SetupItem(string _youthID, string[] _challengeInfo) { youthID = _youthID; challengeInfo = _challengeInfo; youthName.text = DummyPullDataFromID.PullYouthInfoByID(_youthID)[1]; }