public override void OnDestroy() { if (_Instance == this) { _Instance = null; } }
public override void Awake() { base.Awake(); var t = mDMono.transform; m_Icon = t.GetComponent <DynamicUISprite>("DataPanel/Item/Icon"); IconParent = t.FindEx("DataPanel/Item").gameObject; m_Frame = t.GetComponent <UISprite>("DataPanel/Item/Icon/LvlBorder"); m_FrameBG = t.GetComponent <UISprite>("DataPanel/Item/Icon/FrameBG"); m_GoodsName = t.GetComponent <UILabel>("DataPanel/Item/NameLabel"); m_NumLabel = t.GetComponent <UILabel>("DataPanel/Item/NumLabel"); DropItemsRoot = t.GetComponent <Transform>("DataPanel/Sources/Items"); DropItemsGrid = t.GetComponent <UIGrid>("DataPanel/Sources/Items"); m_SourceLabelList = new List <UILabel>(); m_SourceLabelList.Add(t.GetComponent <UILabel>("DataPanel/Sources/Items/0/0")); m_SourceLabelList.Add(t.GetComponent <UILabel>("DataPanel/Sources/Items/1/1")); m_SourceLabelList.Add(t.GetComponent <UILabel>("DataPanel/Sources/Items/2/2")); m_SourceSpriteList = new List <UISprite>(); m_SourceSpriteList.Add(t.GetComponent <UISprite>("DataPanel/Sources/Items/0/BG")); m_SourceSpriteList.Add(t.GetComponent <UISprite>("DataPanel/Sources/Items/1/BG")); m_SourceSpriteList.Add(t.GetComponent <UISprite>("DataPanel/Sources/Items/2/BG")); m_ThisPanel = t.GetComponentEx <UIPanel>(); m_ClipFlag = t.FindEx("DataPanel/Item/Icon/Flag").gameObject; m_EquipSuitIcon = t.GetComponent <DynamicUISprite>("DataPanel/Item/Icon/EquipSuitIcon"); m_boxGradeNumLab = t.GetComponent <UILabel>("DataPanel/Item/Icon/BoxGradeNum"); BigBG = t.GetComponent <UIWidget>("DynamicBG/BG"); SmallBG = t.GetComponent <UIWidget>("DynamicBG/BG4"); GetLabelObj = t.FindEx("DataPanel/Sources/NullLabel").gameObject; t.GetComponent <UIButton>("DataPanel/Sources/Items/0").onClick.Add(new EventDelegate(() => OnGoto(t.GetComponent <Transform>("DataPanel/Sources/Items/0/0")))); t.GetComponent <UIButton>("DataPanel/Sources/Items/1").onClick.Add(new EventDelegate(() => OnGoto(t.GetComponent <Transform>("DataPanel/Sources/Items/1/1")))); t.GetComponent <UIButton>("DataPanel/Sources/Items/2").onClick.Add(new EventDelegate(() => OnGoto(t.GetComponent <Transform>("DataPanel/Sources/Items/2/2")))); if (_Instance == null) { _Instance = this; } _uiToolTipController = t.GetUIControllerILRComponent <UIToolTipPanelController>(); }