public void NestedFilesWithConditionsTest() { const string defineA = "DEFINE_A"; HashSet <string> defines = new HashSet <string>() { defineA }; LineTest[] lines = new LineTest[] { new LineTestParse($"#if NOT_DEFINED", false), new LineTestNestedFile(new [] { new LineTestParse("...", false), }), new LineTestParse($"#elif {defineA}", true), new LineTestNestedFile(new [] { new LineTestParse("...", true), }), new LineTestParse($"#endif", true), new LineTestParse("...", true), }; EvaluateLines(lines, defines); }
// Draws the lines between all the neighboring nodes // private void DrawNeighbors(LocationNode currNode) { List <MapCoords> neighbors = currNode.neighbors; foreach (MapCoords loc in neighbors) { if (locationDisplay[loc.X, loc.Y] != null) { LineTest line = Instantiate <LineTest>(linePrefab); line.SetEndPoints(locationDisplay[currNode.coords.X, currNode.coords.Y].gameObject, locationDisplay[loc.X, loc.Y].gameObject); line.InitLine(); } } }
public void NestedFilesTest() { HashSet <string> defines = new HashSet <string>() { }; LineTest[] lines = new LineTest[] { new LineTestParse("...", true), new LineTestNestedFile(new [] { new LineTestParse("...", true), }), new LineTestParse("...", true), }; EvaluateLines(lines, defines); }
private void Awake() { instance = this; }