Ejemplo n.º 1
0
 private void PutLabelsOn(List <Vector2Int> positions, string[] labelcontents, string defaultContent = "?")
 {
     for (int i = 0; i < positions.Count; i++)
     {
         CellLabel newLabel = Instantiate <CellLabel>(labelPrefab);
         newLabel.SetContent((i < labelcontents.Length ? labelcontents[i] : defaultContent).ToString());
         newLabel.SetColor(labelColor2);
         PutLabelOn(positions[i], newLabel);
     }
 }
Ejemplo n.º 2
0
    public void SetStartEndLabels()
    {
        CellLabel startLabel = Instantiate <CellLabel>(labelPrefab);

        startLabel.SetContent("A");
        startLabel.SetColor(labelColor1);
        PutLabelOn(startCell, startLabel);
        CellLabel endLabel = Instantiate <CellLabel>(labelPrefab);

        endLabel.SetContent("B");
        endLabel.SetColor(labelColor1);
        PutLabelOn(endCell, endLabel);
    }
Ejemplo n.º 3
0
    private void PutLabelsOn(List <Vector2Int> positions, char content, bool increment = false)
    {
        if (positions == null)
        {
            return;
        }

        for (int i = 0; i < positions.Count; i++)
        {
            CellLabel newLabel = Instantiate <CellLabel>(labelPrefab);
            newLabel.SetContent(((char)(content + (increment ? i : 0))).ToString());
            newLabel.SetColor(labelColor2);
            PutLabelOn(positions[i], newLabel);
        }
    }
Ejemplo n.º 4
0
    private void PutLabelsOn(List <Vector2Int> positions, int startInt)
    {
        if (positions == null)
        {
            return;
        }

        for (int i = 0; i < positions.Count; i++)
        {
            CellLabel newLabel = Instantiate <CellLabel>(labelPrefab);
            newLabel.SetContent(((startInt + i)).ToString());
            newLabel.SetColor(labelColor2);
            PutLabelOn(positions[i], newLabel);
        }
    }