/// <summary> /// Запросить затирание пробелами элемента. Запрос будет /// добавлен в очередь и удовлетворен во время следующей отрисовки. /// </summary> public void Remove(IDrawableElement element) { foreach (IDrawable d in element.ElementContent) { Remove(d.Location.X, d.Location.Y); } }
/// <summary> /// Добавить элемент в очередь на отрисовку. /// </summary> public void Create(IDrawableElement element) { foreach (IDrawable d in element.ElementContent) { Create(d); } }
bool IFilterInstance.CheckFilterIn(NGSpotlightWindow window, IDrawableElement element) { DefaultAssetDrawer drawer = element as DefaultAssetDrawer; if (drawer != null) { return(drawer.type == this.type); } return(element.GetType() == type); }
public static void AddEntry(string key, IDrawableElement element) { List <IDrawableElement> list; if (NGSpotlightWindow.entries.TryGetValue(key, out list) == false) { list = new List <IDrawableElement>(); NGSpotlightWindow.entries.Add(key, list); } list.Add(element); }
bool IFilterInstance.CheckFilterIn(NGSpotlightWindow window, IDrawableElement element) { IHasGameObject hasGameObject = element as IHasGameObject; try { return(hasGameObject != null && hasGameObject.GameObject != null && hasGameObject.GameObject.CompareTag(this.tag) == true); } catch { // In case tags are programmatically changed... We never know. } return(false); }
public void RemoveElement(IDrawableElement element) { _elements.Remove(element); _elements.RemoveAll(x => x is Line && (x as Line).ConnectedTo(element)); foreach (var item in _elements) { if (item is Output) { if (((Output)item).Input == element.Name) { ((Output)item).Input = null; } } else if (item is Component) { if (((Component)item).Input.Any(c => c == element.Name)) { ((Component)item).RemoveInput(element.Name); } } } }
bool IFilterInstance.CheckFilterIn(NGSpotlightWindow window, IDrawableElement element) { IHasGameObject hasGameObject = element as IHasGameObject; return(hasGameObject != null && hasGameObject.GameObject != null && hasGameObject.GameObject.GetComponent(this.type) != null); }
bool IFilterInstance.CheckFilterIn(NGSpotlightWindow window, IDrawableElement element) { DefaultAssetDrawer hasGameObject = element as DefaultAssetDrawer; if (hasGameObject != null) { TextureImporter textureImporter = AssetImporter.GetAtPath(hasGameObject.path) as TextureImporter; if (textureImporter != null) { string platform; switch (EditorUserBuildSettings.activeBuildTarget) { case BuildTarget.StandaloneLinux: case BuildTarget.StandaloneLinux64: case BuildTarget.StandaloneLinuxUniversal: case (BuildTarget)4: // BuildTarget.StandaloneOSXIntel case (BuildTarget)27: // BuildTarget.StandaloneOSXIntel64 case (BuildTarget)2: // BuildTarget.StandaloneOSXUniversal case BuildTarget.StandaloneWindows: case BuildTarget.StandaloneWindows64: platform = "Standalone"; break; case BuildTarget.Android: platform = "Android"; break; case BuildTarget.iOS: platform = "iPhone"; break; case BuildTarget.N3DS: platform = "Nintendo 3DS"; break; case BuildTarget.PS4: platform = "PS4"; break; case BuildTarget.PSP2: platform = "PSP2"; break; case BuildTarget.Switch: // Documentation of Unity does not state on this one. platform = "Switch"; break; case BuildTarget.tvOS: platform = "tvOS"; break; case BuildTarget.WebGL: platform = "WebGL"; break; case BuildTarget.WSAPlayer: platform = "Windows Store Apps"; break; case BuildTarget.XboxOne: platform = "XboxOne"; break; default: return(false); } int mts; TextureImporterFormat textureFormat; if (textureImporter.GetPlatformTextureSettings(platform, out mts, out textureFormat) == true) { return((int)textureFormat == (int)this.format); } } } return(false); }
internal bool ConnectedTo(IDrawableElement element) => connection.Item1 == element || connection.Item2 == element;
bool IFilterInstance.CheckFilterIn(NGSpotlightWindow window, IDrawableElement element) { return(element is MenuItemDrawer); }
public void AddElement(IDrawableElement element) => _elements.Add(element);
bool IFilterInstance.CheckFilterIn(NGSpotlightWindow window, IDrawableElement element) { return(element.LowerStringContent.EndsWith(this.extension)); }