public void Wink(Dupe7.DiscMarkedState[,] markedStates)
    {
        for (int c = 0; c < 7; c++) {
            for (int r = 0; r < 7; r++) {
                if (Dupe7.DiscMarkedState.Unmarked != markedStates[c, r]) {
                    bool marked = (Dupe7.DiscMarkedState.DiscMarked == markedStates[c, r]);
                    tiles[c, r].material = marked ? wipeMaterial : blinkMaterial;
                }
            }
        }

        wink = true;
    }
Example #2
0
    MeshFilter CreateDisc(int num, Dupe7.DiscState state, Vector2 pos)
    {
        MeshFilter meshFilter = (MeshFilter)Instantiate (discPrefab);
        {
            meshFilter.mesh = MeshForDisc (num, state);

            meshFilter.transform.parent = discs.transform;
            meshFilter.transform.localPosition = new Vector3 (pos.x, pos.y, 0.0f);
            meshFilter.transform.localScale = Vector3.one;

            meshFilter.gameObject.name = "disc" + (++discCounter);
        }
        return meshFilter;
    }
Example #3
0
 Mesh MeshForDisc(int num, Dupe7.DiscState state)
 {
     bool isOpen = (Dupe7.DiscState.Open == state);
     bool isShut = (Dupe7.DiscState.Shut == state);
     return meshes[isOpen ? (num - 1) : (isShut ? 7 : 8)];
 }