public override void Awake() { base.Awake(); var t = controller.transform; m_Middle = t.GetComponent <UIWidget>("Container/Middle"); m_Container = t.FindEx("Container").gameObject; m_FocusComponent = t.GetMonoILRComponent <FocusEffectController>("Container/Middle/Focus"); m_TouchMengBanHolder = t.GetComponent <UITexture>("Container/MengBanHolder"); m_State = false; m_Tip = t.GetComponent <UIWidget>("Container/Tip"); m_Arrow = t.GetComponent <UIWidget>("Container/Arrow"); m_FingerPanel = m_Arrow.GetComponentInChildren <UIPanel>(); m_ClickFx = t.FindEx("Container/Arrow/OldFxObj").gameObject; m_DragFx = t.FindEx("Container/Arrow/OldFxObj").gameObject; m_Drag2Fx = t.FindEx("Container/Arrow/OldFxObj").gameObject; m_PinchFx = t.FindEx("PinchFx").gameObject; m_Hole = t.GetComponent <UISprite>("Container/Middle/Hole"); m_TipContext = t.GetComponent <UILabel>("Container/Tip/Tips"); m_Forbidden = t.GetComponent <UISprite>("Forbidden"); width_offset = 160; hight_offset = 160; fontsize = 60; m_MonologView = t.GetMonoILRComponent <GuideNodeMonologView>("Monolog"); bigLogSprite = t.FindEx("BigLogSprite").gameObject; mengbanHelper = t.GetMonoILRComponent <GuideNodeMengbanHelper>(); m_waitTimeProgress = t.GetComponent <UIProgressBar>("ProgressHolder/WaitProgressBar"); m_waitTimeLabel = t.GetComponent <UILabel>("ProgressHolder/WaitProgressBar/Label"); var focusEffectController = t.GetMonoILRComponent <FocusEffectController>("Container/Middle/Focus"); t.GetComponent <UIButton>("Container/up").onClick.Add(new EventDelegate(focusEffectController.OnScreenClick)); t.GetComponent <UIButton>("Container/down").onClick.Add(new EventDelegate(focusEffectController.OnScreenClick)); t.GetComponent <UIButton>("Container/left").onClick.Add(new EventDelegate(focusEffectController.OnScreenClick)); t.GetComponent <UIButton>("Container/right").onClick.Add(new EventDelegate(focusEffectController.OnScreenClick)); s_Instance = this; t.gameObject.CustomSetActive(false); m_State = false; Init(); m_MiddleCollider = m_Middle.GetComponent <BoxCollider>(); }
public override void OnDestroy() { s_Instance = null; base.OnDestroy(); }