Пример #1
0
 void LateUpdate()
 {
     cb = rb.GetCountBall();
     if (cb == 4)
     {
         tr.Clear();
     }
 }
Пример #2
0
    void Update()
    {
        cb = rb.GetCountBall();

        switch (cb)
        {
        case 2:

            CreateMesh8(meshtri, meshtri2, verticestri, verticestri2, trianglestri, trianglestri2, black, white);
            //CreateMesh4 (meshtri, verticestri, trianglestri, black);
            break;

        case 4:
            meshtri.Clear();
            CreateMesh4(meshsqu, verticessqu, trianglessqu, white);
            break;

        case 6:
            meshsqu.Clear();
            CreateMesh4(meshrect, verticesrect, trianglesrect, white);
            break;

        case 8:
            meshrect.Clear();
            CreateMesh4(meshcrc, verticescrc, trianglescrc, white);
            break;

        case 10:
            meshcrc.Clear();
            CreateMesh4(meshpar, verticespar, trianglespar, white);
            break;

        case 12:
            meshpar.Clear();
            CreateMesh4(meshtrap, verticestrap, trianglestrap, white);
            break;

        case 14:
            meshtrap.Clear();
            CreateMesh4(meshpent, verticespent, trianglespent, white);
            break;
        }
    }