Ejemplo n.º 1
0
        public override void Create()
        {
            if (body == null)
            {
                body = GetComponent <Body>();
            }
            if (verts == null)
            {
                verts = GetComponent <ClothVerts>();
            }
            if (tris == null)
            {
                tris = GetComponent <ClothTris>();
            }
            if (forces == null)
            {
                forces = GetComponent <Life>();
            }
            if (constraint == null)
            {
                constraint = GetComponent <ConstraintLife>();
            }
            if (connections == null)
            {
                connections = GetComponent <ConnectionList>();
            }
            connections.verts = verts;

            SafeInsert(body);
            SafeInsert(connections);
            SafeInsert(forces);
            SafeInsert(constraint);
            SafeInsert(normalize);
        }
Ejemplo n.º 2
0
        public override void Create()
        {
            transformArray = new float[16];
            if (Hair == null)
            {
                Hair = gameObject.AddComponent <Hair>();
            }
            if (set == null)
            {
                set = gameObject.AddComponent <Life>();
            }
            if (collision == null)
            {
                collision = gameObject.AddComponent <Life>();
            }
            if (constraint == null)
            {
                constraint = gameObject.AddComponent <ConstraintLife>();
            }


            /*
             * All of this info should be visualizable!
             */

            SafePrepend(set);
            SafePrepend(collision);
            SafePrepend(constraint);
            SafePrepend(Hair);

            //Cycles.Insert( 4 , Base );
            numFrames = 0;
        }