virtual public string stringify() { ct = GetType().ToString(); //collision ? if (_collision != null) ct += "\n └ " + HalperString.iStringFormatBool("collidable", _collision.isCollidable()); else ct += "\n └ " + HalperString.iStringFormatBool("collision != null", _collision != null); ct += "\n └ " + HalperString.iStringFormatBool("moved", hasMoved()); return ct; }
/// <summary> /// fetch all TextAsset at path and clean returns lines[] (cleaned from empty lines) /// </summary> /// <param name="path"></param> /// <param name="prefix"></param> /// <returns>filename, lines[]</returns> static public Dictionary <string, string[]> loadResourcesLines(string path, string prefix = "") { List <TextAsset> tmp = loadResources <TextAsset>(path); Dictionary <string, string[]> list = new Dictionary <string, string[]>(); for (int i = 0; i < tmp.Count; i++) { TextAsset ta = tmp[i]; bool toAdd = true; if (prefix.Length > 0 && !ta.name.ToLower().StartsWith(prefix)) { toAdd = false; } if (toAdd) { string[] splitted = ta.text.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); list.Add(ta.name, HalperString.extractNoneEmptyLines(splitted)); } } return(list); }