Example #1
0
    private void DeactivateWalls()
    {
        GameObject room = GameObject.FindGameObjectWithTag("Room");

        for (int i = 0; i < room.transform.childCount; i++)
        {
            Transform  wall       = room.transform.GetChild(i);
            WallScript wallScript = wall.gameObject.GetComponent <WallScript> ();
            if (wallScript.IsSelected())
            {
                wallScript.SetInactive();
            }
        }
    }