/// <summary>
 /// Display the notification in the given slot
 /// </summary>
 /// <param name="notification">The notification</param>
 /// <param name="position">Which position to show it in, top is 0</param>
 public void displayNotification(Notification notification, int position)
 {
     icon = notification.icon as ItemIconController;
     // set timer
     notificationCanvas = notificationCanvas ?? GetComponent <CanvasGroup>();
     displayTimer       = notification.displayTime;
     // set the icon and text
     messageText.text = notification.message;
     icon.parentTo(iconParent);
     icon.resize(65);
     icon.setBGColor(new Color(0, 131, 200));
     // set active and begin animating.
     beginFadeIn();
     beginSliding(BottomPositionIndex, position);
     gameObject.SetActive(true);
 }
示例#2
0
 /// <summary>
 /// mark this item selected
 /// </summary>
 public void markSelected()
 {
     isSelected = true;
     icon.resize(LargeSize);
     icon.setBGColor(SelectedColor);
 }