mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-17 17:34:34 +08:00
simple refactoring
This commit is contained in:
parent
b1ec482266
commit
9567613ed6
@ -1,5 +1,4 @@
|
||||
using DCFApixels.DragonECS.PoolsCore;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using UnityEngine;
|
||||
|
@ -124,7 +124,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
||||
public void Save(DragonDocs docs)
|
||||
{
|
||||
m_docs = docs;
|
||||
if(m_isExpands == null || m_isExpands.Length != docs.Metas.Length)
|
||||
if (m_isExpands == null || m_isExpands.Length != docs.Metas.Length)
|
||||
{
|
||||
Array.Resize(ref m_isExpands, docs.Metas.Length);
|
||||
m_isExpands[0] = true;
|
||||
|
@ -72,7 +72,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
||||
System.Array.Resize(ref _searchingHideGroupMap, DragonDocsPrefs.instance.Infos.Length);
|
||||
}
|
||||
|
||||
if(_selectedIndex < 0 || _selectedIndex >= infos.Length)
|
||||
if (_selectedIndex < 0 || _selectedIndex >= infos.Length)
|
||||
{
|
||||
_selectedIndex = 0;
|
||||
}
|
||||
@ -332,7 +332,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
||||
clippingDepth = int.MaxValue;
|
||||
}
|
||||
|
||||
if(_searchingSample.Length == 0)
|
||||
if (_searchingSample.Length == 0)
|
||||
{
|
||||
EditorGUI.indentLevel = groupInfo.Depth;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ namespace DCFApixels.DragonECS
|
||||
int lastNewLayersCount = newLayers.Count;
|
||||
foreach (var pair in builtinLayerIndexes)
|
||||
{
|
||||
if(pair.Value < 0)
|
||||
if (pair.Value < 0)
|
||||
{
|
||||
newLayers.Add(pair.Key);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
var splitedGroup = group.Splited;
|
||||
|
||||
Item parent = root;
|
||||
if(splitedGroup.Count > 0)
|
||||
if (splitedGroup.Count > 0)
|
||||
{
|
||||
int i = 1;
|
||||
foreach (var subgroup in splitedGroup)
|
||||
|
@ -496,7 +496,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
public static bool IconButton(Texture icon, float iconPadding = 0, string description = null, GUIStyle style = null, params GUILayoutOption[] options)
|
||||
{
|
||||
bool result;
|
||||
if(style == null)
|
||||
if (style == null)
|
||||
{
|
||||
result = GUILayout.Button(UnityEditorUtility.GetLabel(string.Empty), options);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
script = null;
|
||||
string name = type.Name;
|
||||
int indexOf = name.LastIndexOf('`');
|
||||
if(indexOf >= 0)
|
||||
if (indexOf >= 0)
|
||||
{
|
||||
name = name.Substring(0, indexOf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user