Example #1
0
 /// <summary>
 /// Initializes the RGBALed On LedStrip toy.
 /// </summary>
 /// <param name="Cabinet"><see cref="Cabinet"/> object to which the <see cref="RGBAToy"/> belongs.</param>
 protected virtual void InitOutputs(Cabinet Cabinet)
 {
     if (Cabinet.OutputControllers.Contains(OutputControllerName) && Cabinet.OutputControllers[OutputControllerName] is ISupportsSetValues)
     {
         OutputController = (ISupportsSetValues)Cabinet.OutputControllers[OutputControllerName];
     }
 }
        /// <summary>
        /// Initializes the toy.
        /// </summary>
        /// <param name="Cabinet"><see cref="Cabinet" /> object  to which the <see cref="IToy" /> belongs.</param>
        public override void Init(Cabinet Cabinet)
        {
            this.Cabinet = Cabinet;

            if (Cabinet.OutputControllers.Contains(OutputControllerName) && Cabinet.OutputControllers[OutputControllerName] is ISupportsSetValues)
            {
                OutputController = (ISupportsSetValues)Cabinet.OutputControllers[OutputControllerName];
            }

            BuildMappingTables();
            OutputData = new byte[NumberOfOutputs];
            InitFadingCurve(Cabinet);

            Layers = new MatrixDictionaryBase <RGBAColor>()
            {
                Width = Width, Height = Height
            };
        }
Example #3
0
 /// <summary>
 /// Finishes the RGBALed toy.<br/>
 /// Resets the the toy and releases all references.
 /// </summary>
 public override void Finish()
 {
     base.Finish();
     OutputController = null;
 }