Beispiel #1
0
    // Create ---------------------------------------------------------------------------
    public static NcAutoDeactive CreateAutoDestruct(GameObject baseGameObject, float fLifeTime, float fDestroyTime, bool bSmoothHide, bool bMeshFilterOnlySmoothHide)
    {
        NcAutoDeactive ncAutoDeactive = baseGameObject.AddComponent <NcAutoDeactive>();

        ncAutoDeactive.m_fLifeTime                 = fLifeTime;
        ncAutoDeactive.m_fSmoothDestroyTime        = fDestroyTime;
        ncAutoDeactive.m_bSmoothHide               = bSmoothHide;
        ncAutoDeactive.m_bMeshFilterOnlySmoothHide = bMeshFilterOnlySmoothHide;
        if (IsActive(baseGameObject))
        {
            ncAutoDeactive.Start();
            ncAutoDeactive.Update();
        }
        return(ncAutoDeactive);
    }
Beispiel #2
0
	// Property -------------------------------------------------------------------------
	// Event Function -------------------------------------------------------------------
    void OnEnable()
    {
 		m_Sel = target as NcAutoDeactive;
 		m_UndoManager	= new FXMakerUndoManager(m_Sel, "NcAutoDeactive");
	}
 // Property -------------------------------------------------------------------------
 // Event Function -------------------------------------------------------------------
 void OnEnable()
 {
     m_Sel         = target as NcAutoDeactive;
     m_UndoManager = new FXMakerUndoManager(m_Sel, "NcAutoDeactive");
 }