コード例 #1
0
ファイル: AppController.cs プロジェクト: NattyNarwhal/Colours
        /// <summary>
        /// Get the results of the colour and scheme combination.
        /// This will be called by the varioous setters in the object.
        /// </summary>
        private void GetSchemeResults()
        {
            switch (SchemeType)
            {
            case SchemeType.Complement:
                Results = ColorSchemer.Complement(HsvColor);
                break;

            case SchemeType.SplitComplements:
                Results = ColorSchemer.SplitComplement(HsvColor);
                break;

            case SchemeType.Triads:
                Results = ColorSchemer.Triads(HsvColor);
                break;

            case SchemeType.Tetrads:
                Results = ColorSchemer.Tetrads(HsvColor);
                break;

            case SchemeType.RectangleTetrads:
                Results = ColorSchemer.RectangleTetrads(HsvColor);
                break;

            case SchemeType.FiveTone:
                Results = ColorSchemer.FiveTone(HsvColor);
                break;

            case SchemeType.SixTone:
                Results = ColorSchemer.SixTone(HsvColor);
                break;

            case SchemeType.Analogous:
                Results = ColorSchemer.Analogous(HsvColor);
                break;

            case SchemeType.WideAnalogous:
                Results = ColorSchemer.WideAnalogous(HsvColor);
                break;

            case SchemeType.NarrowAnalogous:
                Results = ColorSchemer.NarrowAnalogous(HsvColor);
                break;

            case SchemeType.Monochromatic:
                Results = ColorSchemer.Monochromatic(HsvColor);
                break;

            default:
                throw new ArgumentOutOfRangeException("Not a valid type of scheme.");
            }
        }
コード例 #2
0
    public void SetupBeacon(float shrineHeight)
    {
        beaconLight.transform.localPosition = new Vector3(0, shrineHeight + BeaconDistance, 0);

        ColorSchemer colors = GameObject.FindGameObjectWithTag("ColorSchemer").GetComponent <ColorSchemer>();

        color             = Color.HSVToRGB(colors.BaseHues[ColorBaseHueIndex], ColorSaturation, ColorValue);
        beaconLight.color = color;
        beaconFlare.color = color;
        ExtraFlare.color  = color;

        DeactivateBeacon();
    }