コード例 #1
0
    public void InitPanel(UI.MainUI.UIType func, Transform trans, SystemFuntionButton myParent)
    {
        MyParent = myParent;
        if (m_funcEffect != null)
        {
            DestroyImmediate(m_funcEffect);
        }

        m_funcEffect = CreatObjectToNGUI.Instantiate(EnableFunctionEffect) as GameObject;
        m_funcEffect.transform.parent     = this.transform;
        m_funcEffect.transform.localScale = Vector3.one;

        var parent = m_funcEffect.GetComponent <EnableFuncEffect>().parentTrans;

        CloneEnableFunc(parent, func);
        TaskModel.Instance.isNewFunctionEffing = true;
        //if(m_sysEffect != null)
        //    DestroyImmediate(m_sysEffect);

        //m_sysEffect = CreatObjectToNGUI.Instantiate(EnableSysEffect) as GameObject;
        //m_sysEffect.transform.parent = trans;
        //m_sysEffect.transform.localPosition = Vector3.zero;
        //m_sysEffect.transform.localScale = Vector3.one;

        TraceUtil.Log("开放新功能特效开始播放:" + Time.realtimeSinceStartup);
    }