Esempio n. 1
0
    public void DrawRedPath()
    {
        if (!FindPath.FindPathFunc(Common.Walls[enterX, enterY]))
        {
            UnityEditor.EditorUtility.DisplayDialog("错误警告", "zbd!", "确定");
            return;
        }

        for (int i = 0; i < Common.SizeX; i++)
        {
            for (int j = 0; j < Common.SizeY; j++)
            {
                if (Common.Walls[i, j].IsRightPath)
                {
                    Common.Walls[i, j].gameObject.SetActive(true);
                    Common.Walls[i, j].gameObject.GetComponent <Renderer>().material.color = Color.red;
                }
            }
        }
    }