コード例 #1
0
            public static ColorStatic Create(System.Byte r, System.Byte g, System.Byte b)
            {
                ColorStatic cs = _new();

                cs.red = r; cs.green = g; cs.blue = b;
                return(cs);
            }
コード例 #2
0
            void OnEnable()
            {
                cs = (ColorStatic)target;

                color         = UnityEngine.ScriptableObject.CreateInstance <ColorPicker>();
                color.color.r = cs.red / 255.0f;
                color.color.g = cs.green / 255.0f;
                color.color.b = cs.blue / 255.0f;
                color.color.a = 1.0f;
            }
コード例 #3
0
    private ColorHandler StaticColorHandler()
    {
        MouseZoneLogo zone = UnityEngine.ScriptableObject.CreateInstance <MouseZoneLogo>();
        RateStatic    rate = ScriptableObject.CreateInstance <RateStatic>();

        rate.frequency   = 0;
        rate.repeatLimit = 0;

        ColorStatic cyan = ColorStatic.Create(0, 194, 255);

        return(ColorHandler.Create(zone, IlluminationMode.Color, cyan, rate));
    }
コード例 #4
0
    private ColorHandler RangedColorHandler()
    {
        KeyboardZoneMainKeyboard zone = UnityEngine.ScriptableObject.CreateInstance <KeyboardZoneMainKeyboard>();

        ColorStatic cyan  = ColorStatic.Create(0, 194, 255);
        ColorStatic green = ColorStatic.Create(0, 255, 0);
        ColorStatic red   = ColorStatic.Create(255, 0, 0);

        ColorRange cyanRange  = new ColorRange(0, 10, cyan);
        ColorRange redRange   = new ColorRange(10, 20, red);
        ColorRange greenRange = new ColorRange(20, 100, green);

        ColorRange[] ranges = { cyanRange, redRange, greenRange };

        return(ColorHandler.Create(zone, IlluminationMode.Color, ColorRanges.Create(ranges)));
    }
コード例 #5
0
            public static ColorHandler Create(DeviceZone.AbstractIlluminationDevice_Zone dz, IlluminationMode mode, ColorStatic color, RateStatic rate)
            {
                ColorHandler ch = Create(dz, mode);

                ch.color_static = color;
                ch.rate_static  = rate;
                return(ch);
            }
コード例 #6
0
 public ColorRange(System.UInt32 low, System.UInt32 high, ColorStatic color)
 {
     this.low = low; this.high = high; color_static = color;
 }
コード例 #7
0
            private static ColorStatic _new()
            {
                ColorStatic cs = UnityEngine.ScriptableObject.CreateInstance <ColorStatic>();

                return(cs);
            }