Animate Hue Interface

Animate Hue Interface 1.0.0.6

No permission to download
Requirements
OneTime is required
Using [.Net 4.7.2] (Min Version Compatibility)
This Interface will be developed around animating hues on a variety of things in UO!

**You'll need to install One Time in order to use this system**

***** Rate this Resource if you find it useful *****

Examples Included


[add specialrobe <cycle True/False>
[add specialrobe <1-209> <cycle True/False>
[add specialfloor <hue> <range>
[add specialbat <hue> <range>

This system uses an Interface, see Basic Example below on how to implement it into any existing Item or Mobile!

Interface
Code:
namespace Server.AnimateHue
{
    public interface IAnimateHue
    {
        int HueMin { get; set; }        //Min Hue in a Range
        int HueMax { get; set; }        //Max Hue in a Range

        int HueSpeed { get; set; }      //Frequency of hues changing
        int HueCount { get; set; }      //Counter for Speed

        bool HueCycle { get; set; }     //true is smooth back and forth, false is once at end it repeats from start
        bool HueForward { get; set; }   //Sets direction of Hue if cycle true
    }
}
Basic Example - Add the following code to your items or mobiles to add hue animation
Code:
    public class YourClass: Base, IAnimateHue //Hue Animate Interface
    {
        public int HueMin { get; set; }         //Min Hue in a Range
        public int HueMax { get; set; }         //Max Hue in a Range

        public int HueSpeed { get; set; }       //Frequency of hues changing
        public int HueCount { get; set; }       //Counter for Speed

        public bool HueCycle { get; set; }      //false is smooth back and forth, true is end and repeat from start
        public bool HueForward { get; set; }    //Sets direction of Hue

        [Constructable]
        public YourClass() : base()
        {
            //Hue Setters
            HueMin = 1 <-Starts at Hue 1
            HueMax = 5;  <- This will mark the max range for the Hue, this will cycle over 5 hues
            HueSpeed = 3; <- the larger the number, the slower the intervals between hue changes
            HueCycle = false; <- cycle smooth or not
         }

        public YourClass(Serial serial) : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0);

            //Save Hue Values
            writer.Write(HueMin);
            writer.Write(HueMax);

            writer.Write(HueSpeed);
            writer.Write(HueCount);

            writer.Write(HueCycle);
            writer.Write(HueForward);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            //Load Hue Values
            HueMin = reader.ReadInt();
            HueMax = reader.ReadInt();

            HueSpeed = reader.ReadInt();
            HueCount = reader.ReadInt();

            HueCycle = reader.ReadBool();
            HueForward = reader.ReadBool();
        }
Author
GoldDraco13
Downloads
19
Views
317
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from GoldDraco13

Latest updates

  1. Update - Major

    *Completely rewrote the core of this system to utilize Interface +Will update main post with...
  2. Update - Major

    *Change the core system to use One Time (You will need that system in order to use Animate Hues)...
  3. Animate Floor Hue

    *Updated the robe, you'll need to delete the old ones, if you do not want to use the new robe...