Example #1
0
 public void DisplayAsIndicator(Shader holoShader, Cells.Colours colour)
 {
     IsPlaced = false;
     SetMaterialFromColour(colour);
     ApplyHoloShader(holoShader);
     ShowAsInvalid();
 }
Example #2
0
        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);
        }
Example #3
0
        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();
        }