Beispiel #1
0
        void Awake()
        {
            m_PackRightBtnManager = CreatObjectToNGUI.InstantiateObj(RightBtnManagerPrefab, transform).GetComponent <PackRightBtnManager>();
            m_PackRightBtnManager.transform.localPosition = RightBtnHidPos;
            BesetSuccessEff1   = CreatObjectToNGUI.InstantiateObj(BesetSuccessEff1_profab, transform);
            SwallowSuccessEff1 = CreatObjectToNGUI.InstantiateObj(SwallowSuccessEff1_prefab, transform);
            SwallowSuccessEff1.transform.localPosition = new Vector3(0, 0, -25);
            BesetSuccessEff1.SetActive(false);
            SwallowSuccessEff1.SetActive(false);
            //返回按钮点击
            BackBtn.SetCallBackFuntion((obj) =>
            {
                SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Cancel");

                this.Close();
            });
            //返回按钮按下/松开效果
            BackBtn.SetPressCallBack((isPressed) =>
            {
                BackBtn.spriteSwithList.ApplyAllItem(P => P.ChangeSprite(isPressed ? 2 : 1));
            });
            m_createInstance = true;
            var commonPanel = NGUITools.AddChild(gameObject, CommonPanelTitle_Prefab);

            commonPanel.transform.localPosition = CommonPanelTitle_Prefab.transform.localPosition;
            commonPanel.GetComponent <CommonPanelTitle>().TweenShow();
            //RegisterEventHandler ();
            TaskGuideBtnRegister();
        }
Beispiel #2
0
 void Awake()
 {
     m_PackRightBtnManager = CreatObjectToNGUI.InstantiateObj(RightBtnManagerPrefab, transform).GetComponent <PackRightBtnManager>();
     m_PackRightBtnManager.transform.localPosition = RightBtnHidPos;
     BackBtn.SetCallBackFuntion(Close);
     Linkpanel = CreatObjectToNGUI.InstantiateObj(PathLinkPanelPrefab, transform).GetComponent <PathLinkPanel>();
     Linkpanel.transform.localPosition = new Vector3(0, 0, -1000);
     //TaskGuideBtnRegister();
 }