FashionShowCloseItem.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class FashionShowCloseItem
  6. {
  7. #region Config
  8. //StartMark-Used by LabelUtility-Do not remove
  9. private Image Icon1;
  10. private Image Icon2;
  11. private Image Icon3;
  12. private Button BuyButton;
  13. private TextPlus BuyButtonText;
  14. //EndMark-Used by LabelUtility-Do not remove
  15. #endregion
  16. public void Init(int closeID, Transform fashionShowCloseItem)
  17. {
  18. Dictionary<string, Transform> childDictionary = new Dictionary<string, Transform>();
  19. Auxiliary.CompileDic(fashionShowCloseItem, childDictionary);
  20. Icon1 = childDictionary["Icon1"].GetComponent<Image>();
  21. Icon2 = childDictionary["Icon2"].GetComponent<Image>();
  22. Icon3 = childDictionary["Icon3"].GetComponent<Image>();
  23. BuyButton = childDictionary["BuyButton"].GetComponent<Button>();
  24. BuyButtonText = childDictionary["BuyButtonText"].GetComponent<TextPlus>();
  25. CloseItem closeItem = PlayerManager.CloseItemDictionary[closeID];
  26. closeItem.SetupStandardItem(Icon1, Icon2, Icon3, BuyButton, BuyButtonText);
  27. }
  28. }