GiftReportUI createGiftReportUI(GiftReport report) { GiftReportUI reportUI = Instantiate(scoutingReportDisplay); reportUI.Init(report); return(reportUI); }
void handleDogGiftCollected(Dog dog, bool resendOutToScout) { if (gameController) { DogDescriptor dogInfo = dog.Info; CurrencyData reward = gameController.GetGift(dogInfo); GiftReport report = new GiftReport(dogInfo, reward); createGiftReportUI(report); } }
public void Init(GiftReport report) { if (report.HasDog) { this.dogPortrait.sprite = report.Dog.Portrait; } this.rewardIcon.sprite = report.Currency.Icon; this.rewardIcon.color = report.Currency.Color; this.reportText.text = report.ToString(); Show(); EventController.Event(k.GetPlayEvent(k.GIFT_REDEEM)); }