Inheritance: MonoBehaviour
示例#1
0
        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);
        }
示例#2
0
    // 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();
            }
        }
    }
示例#3
0
        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);
        }
示例#4
0
 private void Awake()
 {
     instance = this;
 }