public override List <string> ToRowStrings(Bounding bounds = null) { if (bounds == null) { bounds = Bounding; } return(Nifty.AddRuler(arr.ToRowStrings(Bounding.Shift(-shift)), bounds)); }
public void Initialize() { // Create arrays with size = enum length logs = new Log[Enum.GetNames(typeof(Logs)).Length]; // Wipe old debug logs Nifty.DeleteContainedFiles(debugFolder, true); // Load Debug log defaults int enumLength = Enum.GetNames(typeof(Logs)).Length; logNames = new string[enumLength]; logPaths = new string[enumLength]; logOn = new bool[enumLength]; putName(Logs.Main, "=== Main ==="); putPath(Logs.LevelGen, "LevelGen/"); putName(Logs.LevelGen, "LevelGenTmp"); putPath(Logs.LevelGenMain, "LevelGen/"); putName(Logs.LevelGenMain, "Level Gen Main"); putPath(Logs.NPCs, "NPCs/"); putName(Logs.NPCs, "NPCs"); putName(Logs.XML, "Xml"); putName(Logs.TypeHarvest, "TypeHarvest"); putName(Logs.Pathfinding, "Pathfinding"); // Set Logging to be on #if !UNITY_EDITOR Logging = false; #endif logging(Logging); foreach (Logs l in ActiveLogs) { logging(l, Logging); } foreach (DebugFlag f in ActiveFlags) { flags[f] = Logging; } // Test output if (logging(Logs.Main)) { w(Logs.Main, "Debug Manager Started."); if (logging(Logs.LevelGen)) { w(Logs.Main, "Level Gen Debugging On."); } } }
public Point Reduce() { int gcd = Nifty.GCD(x, y); return(new Point(x / gcd, y / gcd)); }