Ejemplo n.º 1
0
    // Create ---------------------------------------------------------------------------
    public static NcAutoDestruct_B CreateAutoDestruct(GameObject baseGameObject, float fLifeTime, float fDestroyTime, bool bSmoothHide)
    {
        NcAutoDestruct_B ncAutoDestruct = baseGameObject.AddComponent <NcAutoDestruct_B>();

        ncAutoDestruct.m_fLifeTime          = fLifeTime;
        ncAutoDestruct.m_fSmoothDestroyTime = fDestroyTime;
        ncAutoDestruct.m_bSmoothHide        = bSmoothHide;
        if (IsActive(baseGameObject))
        {
            ncAutoDestruct.Start();
            ncAutoDestruct.Update();
        }
        return(ncAutoDestruct);
    }