Exemplo n.º 1
0
 private void ChangeColor(Material color, string layer)
 {
     Collider.layer = LayerMask.NameToLayer(layer);
     Up.GetComponent <Renderer>().material      = color;
     Down.GetComponent <Renderer>().material    = color;
     Left.GetComponent <Renderer>().material    = color;
     Right.GetComponent <Renderer>().material   = color;
     Bottom.GetComponent <Renderer>().material  = color;
     Ceiling.GetComponent <Renderer>().material = color;
 }