示例#1
0
    public void CopyModelTo(LowPolyModel other)
    {
        Component[] theseComponents = this.GetComponentsInChildren <Component>(true);
        Component[] otherComponents = other.GetComponentsInChildren <Component>(true);

        int numLRs = theseComponents.Length;

        if (otherComponents.Length == numLRs)
        {
            for (int i = 0; i < numLRs; i++)
            {
                LowPolyModelValues.CopyFromTo(theseComponents[i], otherComponents[i]);
            }
        }
        else
        {
            Debug.Log("Numcomponents error");
        }

        other.changeCount = changeCount;
    }
示例#2
0
    public bool ValuesEquals(LowPolyModel other)
    {
        Component[] thisComponents  = this.GetComponentsInChildren <Component>(true);
        Component[] otherComponents = other.GetComponentsInChildren <Component>(true);

        int numComponents = thisComponents.Length;

        if (otherComponents.Length != numComponents)
        {
            return(false);
        }
        else
        {
            for (int i = 0; i < numComponents; i++)
            {
                if (LowPolyModelValues.Equality(thisComponents[i], otherComponents[i]) == false)
                {
                    return(false);
                }
            }
        }

        return(true);
    }