コード例 #1
0
    void DrawWayPoint(ref int childCount, LinkedList <Vector2> WayPointarray)
    {
        SceneEditorWindow.StartSpace(2, 15);
        childCount = childCount + WayPointarray.Count;
        int index = 1;

        foreach (var item in WayPointarray)
        {
            GUILayout.Label("路径点: " + (index++).ToString() + "  X: " + item.x.ToString() + "  Y: " + item.y.ToString());
        }
        SceneEditorWindow.EndSpace();
    }
コード例 #2
0
    void DrawTotalInfo()
    {
        mb_TotalInfo = EditorGUILayout.Foldout(mb_TotalInfo, "统计信息");
        if (mb_TotalInfo)
        {
            SceneEditorWindow.StartSpace(1, 15);
            mb_MonsterTotalInfo = EditorGUILayout.Foldout(mb_MonsterTotalInfo, "场景点统计信息");
            if (mb_MonsterTotalInfo)
            {
                SceneEditorWindow.StartSpace(1, 20);
                GUILayout.Space(2);
                //DrawTotalMonsterBorn(InteractionTool.GetBornParent());
                SceneEditorWindow.EndSpace();
            }

            mb_FixMonsterTotalInfo = EditorGUILayout.Foldout(mb_FixMonsterTotalInfo, "定点统计信息");
            if (mb_FixMonsterTotalInfo)
            {
                SceneEditorWindow.StartSpace(1, 15);
                EditorGUILayout.BeginHorizontal();
                DrawId("I  D", 50, 0);
                DrawName("名  字", 90, -5);
                DrawLv("数  量", 55, -5);
                EditorGUILayout.EndHorizontal();
                GUILayout.Space(2);
                DrawTotalBorn(InteractionTool.GetDCBornTotalNumber());
                SceneEditorWindow.EndSpace();
            }


            mb_OBjTotalInfo = EditorGUILayout.Foldout(mb_OBjTotalInfo, "OBJ统计信息");
            if (mb_OBjTotalInfo)
            {
                SceneEditorWindow.StartSpace(1, 15);
                EditorGUILayout.BeginHorizontal();
                DrawId("I  D", 50, 0);
                DrawName("名  字", 90, -5);
                DrawLv("数  量", 55, -5);
                EditorGUILayout.EndHorizontal();
                GUILayout.Space(2);
                DrawTotalBorn(InteractionTool.GetDCObjTotalNumber());
                SceneEditorWindow.EndSpace();
            }

            GUILayout.Label("场景所有对象总数:" + " " + (InteractionTool.GetRegionParent().childCount + InteractionTool.GetPointParent().childCount).ToString());
            SceneEditorWindow.EndSpace();
        }
    }
コード例 #3
0
    //GUI绘制函数, Unity函数
    void OnGUI()
    {
        if (!Application.isPlaying)
        {
            CloseWindow();
        }
        else
        {
            EditorGUILayout.BeginHorizontal();
            mp_ScroPos = EditorGUILayout.BeginScrollView(mp_ScroPos, false, false);
            EditorGUILayout.BeginVertical();

            mb_FoldMonsterInfo = EditorGUILayout.Foldout(mb_FoldMonsterInfo, "怪物信息");
            if (mb_FoldMonsterInfo)
            {
                SceneEditorWindow.StartSpace(1, 15);
                DrawBornInfo();
                SceneEditorWindow.EndSpace();
            }
            if (mb_MonsterBorn)
            {
                //DrawFixMonstBorninfo(ref mb_MonsterBorn, "范围刷怪点列表", InteractionTool.GetBornParent(), ref mp_MonsterBornPos, m_DCBornDictArray);
            }

            if (mb_FixMonsterBorn)
            {
                // DrawFixMonstBorninfo(ref mb_FixMonsterBorn, "定点刷怪列表", InteractionTool.GetFixBornParent(), ref mp_FixBornPos, m_DCFixBornDictArray);
            }

            if (mb_ObjBorn)
            {
                //  DrawFixMonstBorninfo(ref mb_ObjBorn, "OBJ列表", InteractionTool.GetObjParent(), ref mp_ObjBornPos, null);
            }


            DrawTotalInfo();

            EditorGUILayout.EndVertical();
            EditorGUILayout.EndScrollView();
            EditorGUILayout.EndHorizontal();
        }
    }