public override void Awake() { base.Awake(); CloseBtn = mDMono.transform.Find("BackButton").GetComponent <UIButton>(); BackBGBtn = mDMono.transform.Find("BG/BackBG").GetComponent <UIButton>(); EditNameBtn = mDMono.transform.Find("EditNameBtn").GetComponent <UIButton>(); EditIconBtn = mDMono.transform.Find("EditIconBtn").GetComponent <UIButton>(); Icon = mDMono.transform.Find("Badge/LegionIcon").GetComponent <UISprite>(); IconBG = mDMono.transform.Find("Badge/IconBG").GetComponent <UISprite>(); CoinNumLab = mDMono.transform.Find("EditNameBtn/CoinNum").GetComponent <UILabel>(); IconEditView = mDMono.transform.parent.Find("LTLegionIconEditView").GetMonoILRComponent <LegionIconEditView>(); BtInput = mDMono.transform.Find("Name/InputLabel").GetComponent <UIInput>(); if (CloseBtn != null) { CloseBtn.onClick.Add(new EventDelegate(OnClickCloseBtn)); } if (BackBGBtn != null) { BackBGBtn.onClick.Add(new EventDelegate(OnClickCloseBtn)); } if (EditNameBtn != null) { EditNameBtn.onClick.Add(new EventDelegate(OnClickChangeLegionName)); } if (EditIconBtn != null) { EditIconBtn.onClick.Add(new EventDelegate(OnClickEditIconBtn)); } Messenger.AddListener <int>(Hotfix_LT.EventName.LegionIconIDEdit, OnLegionIconEditFunc); }
public override void Start() { base.Start(); IconEditView = mDMono.transform.parent.Find("LTLegionIconEditView").GetMonoILRComponent <LegionIconEditView>(); }