System.Collections.Generic.List.Add(slot)

Here are the examples of the csharp api System.Collections.Generic.List.Add(slot) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 View Source File : Chiseling.cs
License : MIT License
Project Creator : axksel

public void replacedignFixedPoints()
    {
        gridManager = GetComponent<GridManager>();
        size = gridManager.gridX * gridManager.gridZ;

        for (int i = 0; i < gridManager.gridX; i++)
        {
            for (int k = 0; k < gridManager.gridY; k++)
            {
                for (int j = 0; j < gridManager.gridZ; j++)
                {
                    allPoints.Add(grid[i, k, j]);
                    grid[i, k, j].isFixed = false;
                }
            }
        }

        for (int i = 0; i < fixedPointsPositions.Count; i++)
        {
            fixedPoints.Add(grid[(int)fixedPointsPositions[i].x, 0, (int)fixedPointsPositions[i].y]);
            grid[(int)fixedPointsPositions[i].x, 0, (int)fixedPointsPositions[i].y].isFixed = true;
        }
        StartCoroutine(TryToRemove());
    }

19 View Source File : Chiseling.cs
License : MIT License
Project Creator : axksel

public IEnumerator Visit(slot slot)
    {
        if (fixedSlotsVisited == fixedPoints.Count)
        {
            yield return null;
        }
        else
        {
            if (slot.isPath && !slot.isVisited)
            {
                slot.isVisited = true;
                visitedPoints.Add(slot);

                if (slot.isFixed)
                {
                    fixedSlotsVisited++;
                }

                if (slot.neighbours[0] != null)
                    StartCoroutine(Visit(slot.neighbours[0]));
                if (slot.neighbours[1] != null)
                    StartCoroutine(Visit(slot.neighbours[1]));
                if (slot.neighbours[2] != null)
                    StartCoroutine(Visit(slot.neighbours[2]));
                if (slot.neighbours[3] != null)
                    StartCoroutine(Visit(slot.neighbours[3]));
            }
        }


    }