예제 #1
0
 public void AddPoint(Vector3 point)
 {
     line.Add(point);
     if (line.Count >= 2)
     {
         GenerateMesh(mesh.mesh);
         ColliderGenerator.Generate(mesh.mesh, collider);
     }
 }
예제 #2
0
    public void Generate(
        float x, float z)
    {
        Vector3 pos = new Vector3(x, 0, z);

        WaitCallback callback = new WaitCallback(delegate
        {
            meshData = ColliderGenerator.Generate(datas, pos);
            actionsToDo.Enqueue(PutMeshValues);
        });

        ThreadPool.QueueUserWorkItem(callback);
    }
예제 #3
0
    public void Generate(
        float x, float z)
    {
        Vector3 pos = new Vector3(x, 0, z);

        WaitCallback callback = new WaitCallback(delegate
        {
            try
            {
                meshData = ColliderGenerator.Generate(datas, pos);
                actionsToDo.Enqueue(PutMeshValues);
            }
            catch (Exception e)
            {
                Debug.LogWarning(e.Message);
            }
        });

        ThreadPool.QueueUserWorkItem(callback);
    }