public void Init() { EmailDataHelper.SelectNotification(); SetPosition(); SetIcon(); Color bgColor = bgImage.color; bgColor.a = 0; bgImage.color = bgColor; bgImage.DOFade(1.0f, 0.35f); txtEmailSender.text = EmailDataHelper.GetEmailSenderText(); txtShortDescription.text = EmailDataHelper.GetShortDescriptionText(); type = ConvertFromStr(EmailDataHelper.GetType()); }
private void SetIcon() { var iconId = EmailDataHelper.GetIconId(); icon.sprite = possibleIcons[iconId]; Color iconColor; if (iconId == 0) { iconColor = possibleColors[Random.Range(0, possibleColors.Count)]; } else { iconColor = icon.color; } iconColor.a = 0.0f; icon.color = iconColor; icon.DOFade(1.0f, 0.35f); }