// ========================================================================== // /* protected - Override & Unity API */ protected override void OnAwake() { base.OnAwake(); UIAnimationLogicFactory pLogicFactory_Show = new UIAnimationLogicFactory(); UIAnimationLogicFactory pLogicFactory_Hide = new UIAnimationLogicFactory(); // 로직이 이미 있으면 그 로직을 전부 사용하고, // 로직이 하나도 없으면 GetComponents를 이용해서 얻어오는데, // 리펙토링이 필요하다.. if (listAnimationLogic_Show.Count != 0) { pLogicFactory_Show.DoAdd_Animation_Collection(listAnimationLogic_Show); } else { pLogicFactory_Show.DoAdd_Animation_Collection(GetComponents <IUIAnimationLogic_Show>()); } if (listAnimationLogic_Hide.Count != 0) { pLogicFactory_Hide.DoAdd_Animation_Collection(listAnimationLogic_Hide); } else { pLogicFactory_Hide.DoAdd_Animation_Collection(GetComponents <IUIAnimationLogic_Hide>()); } pAnimation_Show.DoInit(this, StartCoroutine, StopCoroutine); pAnimation_Show.DoInit_Animation(pLogicFactory_Show); pAnimation_Hide.DoInit(this, StartCoroutine, StopCoroutine); pAnimation_Hide.DoInit_Animation(pLogicFactory_Hide); }
public void DoInit_Animation(UIAnimationLogicFactory pLogicFactory) { listUIAnimationLogic.AddRange(pLogicFactory.listUIAnimationLogic); pLogicFactory.listUIAnimationLogic.ForEach(p => p.IUIAnimationLogic_OnAwake(_pUIObject)); }