예제 #1
0
        public void Display()
        {
            AssetPreview.SetPreviewTextureCacheSize(256);
            Event e = Event.current;

            mouseDoubleClick.Update();
            if (e.isMouse || e.type == EventType.ScrollWheel)
            {
                is_update_scroll_pos = true;
            }
            if (e.type == EventType.Layout && selected_tileSetBrush_in_inspector != null)
            {
                Selection.activeObject             = selected_tileSetBrush_in_inspector;
                selected_tileSetBrush_in_inspector = null;
            }
            if (last_time == 0f)
            {
                last_time = Time.realtimeSinceStartup;
            }
            time_delta = Time.realtimeSinceStartup - last_time;
            last_time  = Time.realtimeSinceStartup;
            if (tileSet == null)
            {
                EditorGUILayout.HelpBox("没有选中tileSet", MessageType.Info);
                return;
            }
            if (tileSet.atlas_texture == null)
            {
                EditorGUILayout.HelpBox("tileSet中没有atlas_texture", MessageType.Info);
                return;
            }
            if (tileSet.tile_list.Count == 0)
            {
                EditorGUILayout.HelpBox("tileSet中没有tiles", MessageType.Info);
                return;
            }
            sharedTileSetData = GetSharedTileSetData(tileSet);


            DrawTileView();
            DrawTilePaletteSetting();
            DrawTilePalette();
            DisplayTileSetBrush();
        }