Пример #1
0
        /// <summary>
        /// Draws the node window.
        /// </summary>
        /// <param name="id">Identifier.</param>
        protected override void DrawNodeWindow(int id)
        {
            int iconSize = (int)EditorGUIUtility.singleLineHeight;

            ZEntity en = curPoolConfig.CurPool.FindEntityTemplateByID(id);

            if (en.EType == EntityType.System)
            {
                GUI.DrawTexture(new Rect(5, 20, iconSize, iconSize), IconHelper.SystemsHierarchyIcon);
            }
            else
            {
                GUI.DrawTexture(new Rect(5, 20, iconSize, iconSize), IconHelper.EntityHierarchyIcon);
            }



            if (en != null)
            {
                int count = en.GetComponentCount();
                GUILayout.Label("      x " + count.ToString());
            }

            //draw delete button

            base.DrawNodeWindow(id);
        }