Exemple #1
0
    bool CreateCurrentInstanceEffect(GameObject gameObj)
    {
        NgUtil.LogDevelop("CreateCurrentInstanceEffect() - gameObj - " + gameObj);
        GameObject parentObj = GetInstanceRoot();

        // 이전거 삭제
        NgObject.RemoveAllChildObject(parentObj, true);

        // 새로 생성
        if (gameObj != null)
        {
            GameObject createObj = (GameObject)Instantiate(gameObj);
            NsEffectManager.PreloadResource(createObj);

            createObj.transform.parent = parentObj.transform;
            m_InstanceEffectObject     = createObj;
#if (UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9)
            NgObject.SetActiveRecursively(createObj, true);
#endif
            m_FXMakerControls.SetStartTime();

            return(true);
        }
        m_InstanceEffectObject = null;
        return(false);
    }
Exemple #2
0
    bool CreateCurrentInstanceEffect(GameObject gameObj)
    {
        NgUtil.LogDevelop("CreateCurrentInstanceEffect() - gameObj - " + gameObj);
        GameObject parentObj = GetInstanceRoot();

        // 이전거 삭제
        NgObject.RemoveAllChildObject(parentObj, true);

        // 새로 생성
        if (gameObj != null)
        {
            GameObject createObj = (GameObject)Instantiate(gameObj);
            NcEffectBehaviour.PreloadTexture(createObj);

            createObj.transform.parent = parentObj.transform;
            m_InstanceEffectObject     = createObj;
            m_FXMakerControls.SetStartTime();

            return(true);
        }
        m_InstanceEffectObject = null;
        return(false);
    }