Exemplo n.º 1
0
        static LD_MeshPool()
        {
            Vector2[] uvs = new Vector2[4]
            {
                new Vector2(0.06f, 0f),
                new Vector2(0.06f, 1f),
                new Vector2(0.061f, 1f),
                new Vector2(0.061f, 0f)
            };
            LD_MeshPool.plane10FillHalf = LD_MeshPool.NewPlaneMesh(new Vector2(0.57f, 1f), false, uvs);
            LD_MeshPool.plane10Fill     = LD_MeshPool.NewPlaneMesh(new Vector2(1.2f, 1f), false, uvs);

            Vector3[] vectors = new Vector3[2]
            {
                new Vector3(0f, 0f, -1f),
                new Vector3(0f, 0f, 1f)
            };
            Vector3[] offsets = new Vector3[6]
            {
                new Vector3(0f, 0.1f, 0.1f),
                new Vector3(0f, 0.1f, -0.1f),
                new Vector3(0f, 0f, 0.5f),
                new Vector3(0f, 0.1f, -0.23f),
                new Vector3(0f, 0f, -0.5f),
                new Vector3(0f, 0.1f, 0.23f)
            };

            LD_MeshPool.doorMeshPosSet = new MeshPosSet[]
            {
                new MeshPosSet(
                    new Vector3[] { vectors[0], default(Vector3) },
                    new Vector3[] { offsets[0], default(Vector3) },
                    new Mesh[] { LD_MeshPool.plane10Fill, null }),
                new MeshPosSet(
                    new Vector3[] { vectors[1], default(Vector3) },
                    new Vector3[] { offsets[1], default(Vector3) },
                    new Mesh[] { LD_MeshPool.plane10Fill, null }),
                new MeshPosSet(
                    new Vector3[] { vectors[0], vectors[0] },
                    new Vector3[] { offsets[2], offsets[3] },
                    new Mesh[] { MeshPool.plane10, LD_MeshPool.plane10FillHalf }),
                new MeshPosSet(
                    new Vector3[] { vectors[1], vectors[1] },
                    new Vector3[] { offsets[4], offsets[5] },
                    new Mesh[] { MeshPool.plane10Flip, LD_MeshPool.plane10FillHalf }),
                new MeshPosSet(
                    new Vector3[] { vectors[0], vectors[1] },
                    new Vector3[] { default(Vector3), default(Vector3) },
                    new Mesh[] { MeshPool.plane10, MeshPool.plane10Flip })
            };
        }
 static LD_MeshPool()
 {
     LD_MeshPool.Plane10Wide     = LD_MeshPool.NewPlaneMesh(new Vector2(2f, 1f), false);
     LD_MeshPool.Plane10FlipWide = LD_MeshPool.NewPlaneMesh(new Vector2(2f, 1f), true);
 }