Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        int tileContents = gameManager.CheckTileContents(transform.position);

        if (mouseOver == true)
        {
            mat.color = Color.white;
        }
        else
        {
            if (tileContents == 0)
            {
                mat.color = Color.clear;
            }
            else if (tileContents == 1)
            {
                mat.color = Color.blue;
            }
            else if (tileContents == 2)
            {
                mat.color = Color.red;
            }
        }
    }