public void DisplayAsIndicator(Shader holoShader, Cells.Colours colour) { IsPlaced = false; SetMaterialFromColour(colour); ApplyHoloShader(holoShader); ShowAsInvalid(); }
private void SetMaterialFromColour(Cells.Colours colour) { switch (colour) { case Cells.Colours.Blue: SetMaterial(colourProfile.blue); break; case Cells.Colours.Red: SetMaterial(colourProfile.red); break; default: Debug.LogError("Invalid colour: " + colour); SetMaterial(colourProfile.black); break; } hexOutline.SetColour(colour); }
public void SetColour(Cells.Colours colour) { switch (colour) { case Cells.Colours.Blue: normalMaterial = blueMaterial; selectedMaterial = blueSelectedMaterial; break; case Cells.Colours.Red: normalMaterial = redMaterial; selectedMaterial = redSelectedMaterial; break; default: Debug.LogError("Invalid colour: " + colour); normalMaterial = blueMaterial; selectedMaterial = blueSelectedMaterial; break; } SetUnselected(); }