public ZenSharpLookupItem(Template template, GenerateTree tree, IEnumerable <string> scopes, IconId iconId) : base(template, true) { _tree = tree; _scopes = scopes; _template = template; Log.Info("Creating ZenSharpLookupItem with template = {0}", template); _iconId = iconId; _displayName = _template.Text; }
public override void OnInspectorGUI() { DrawDefaultInspector(); if (GUILayout.Button("Regenerate")) { GenerateTree Gent = (GenerateTree)target; Gent.BuildMesh(); } }
public ZenSharpLookupItem(Template template, GenerateTree tree, IEnumerable<string> scopes, IconId iconId) : base(null, template, true) { _tree = tree; _scopes = scopes; _template = template; // fixme: what is it? Log.Info("Creating ZenSharpLookupItem with template = {0}", template); _iconId = iconId; _displayName = _template.Text; }
private void Start() { if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; } mapObjects = new List <GameObject>(); }
public void TestGenerateTree(string inOrderData, string preOrderData, string postOrderData) { int[] inOrder = GetData(inOrderData); int[] preOrder = GetData(preOrderData); int[] postOrder = GetData(postOrderData); var generator = new GenerateTree(); var root = generator.BuildTreeV2(inOrder, preOrder, 0, inOrder.Length - 1); var actual = generator.PrintPostOrder(root); Assert.Equal(postOrder, actual); }
public void Reload(string file) { try { var path = file; _tree = new LtgParser().ParseAll(File.ReadAllText(path)); Log.Info("Config reloaded from {0}", path); } catch (Exception e) { Log.Error("Error loading config", e); throw; } }
public override void OnInspectorGUI() { DrawDefaultInspector(); GenerateTree myScript = (GenerateTree)target; myScript.shape = Int_CheckBoundary(myScript.shape, shapeMin, shapeMax); myScript.frequency = Float_CheckBoundary(myScript.frequency, freqMin, freqMax); myScript.amplification = Float_CheckBoundary(myScript.amplification, ampMin, ampMax); if (GUILayout.Button("Generate")) { myScript.Generate(); } if (GUILayout.Button("Destroy Object")) { myScript.DestroyObject(); } }
public void Reload(string file) { try { var path = file; _tree = new LtgParser().ParseAll(File.ReadAllText(path)); Log.Info("Config reloaded from {0}", path); } catch (Exception e) { Log.Error("Error loading config", e); throw; } }
public void FixtureSetup() { _tree = new LtgParser().Parse(File.ReadAllText(TemplatesRelativePath)).Value; }
public void FixtureSetup() { _tree = new LtgParser().Parse(File.ReadAllText(TemplatesRelativePath)).Value; }
public void LoadTree() { _tree = new LtgParser().ParseAll(_content); _ltm = new LiveTemplateMatcher(_tree); }
public void LoadTree() { _tree = new LtgParser().ParseAll(_content); _ltm = new LiveTemplateMatcher(_tree); }
private void OnDestroy() { instance = null; }