Пример #1
0
    protected void ChangeParent(Transform newParent, Transform child, bool bKeepingLocalTransform, Transform addTransform)
    {
        NcTransformTool ncTransformTool = null;

        if (bKeepingLocalTransform)
        {
            ncTransformTool = new NcTransformTool(child.get_transform());
            if (addTransform != null)
            {
                ncTransformTool.AddTransform(addTransform);
            }
        }
        child.set_parent(newParent);
        if (bKeepingLocalTransform)
        {
            ncTransformTool.CopyToLocalTransform(child.get_transform());
        }
        if (bKeepingLocalTransform)
        {
            NcBillboard[] componentsInChildren = base.get_gameObject().GetComponentsInChildren <NcBillboard>();
            NcBillboard[] array = componentsInChildren;
            for (int i = 0; i < array.Length; i++)
            {
                NcBillboard ncBillboard = array[i];
                ncBillboard.UpdateBillboard();
            }
        }
    }
Пример #2
0
	// Property -------------------------------------------------------------------------
	// Event Function -------------------------------------------------------------------
    void OnEnable()
    {
 		m_Sel = target as NcBillboard;
 		m_UndoManager	= new FXMakerUndoManager(m_Sel, "NcBillboard");
   }
Пример #3
0
 // Property -------------------------------------------------------------------------
 // Event Function -------------------------------------------------------------------
 void OnEnable()
 {
     m_Sel         = target as NcBillboard;
     m_UndoManager = new FXMakerUndoManager(m_Sel, "NcBillboard");
 }