Exemple #1
0
    public void Un_Flag_Box(int x, int y)
    {
        Total_Flags++;
        Testing_Box TB_Src = Boxes[x, y].GetComponent <Testing_Box>();

        TB_Src.Flaged = false;
        Flag_Vectors.Remove(new Vector2(x, y));
        Destroy(TB_Src.Flag_Sprite);
        return;
    }
Exemple #2
0
    public void Flag_Box(int x, int y)
    {
        if (Total_Flags <= 0)
        {
            return;
        }
        Total_Flags--;
        Testing_Box TB_Src = Boxes[x, y].GetComponent <Testing_Box>();

        TB_Src.Flaged = true;
        Vector3 pos = Boxes[x, y].transform.position;

        TB_Src.Flag_Sprite = Instantiate(Flag_Prefab, pos, Quaternion.identity);
        if (Mine_Vectors.Contains(new Vector2(x, y)))
        {
            Flag_Vectors.Add(new Vector2(x, y));
        }
        return;
    }