namespace UMA { #region DNASETTER /// /// A DnaSetter is used to set a specific piece of DNA on the avatar /// that it is pulled from. /// public class DnaSetter { public string Name; // The name of the DNA. public float Value; // Current value of the DNA. public string Category; public int OwnerIndex { // position of DNA in index, created at initialization get; private set; } protected UMADnaBase Owner; // owning DNA class. Used to set the DNA by index /// /// Construct a DnaSetter /// /// /// /// /// /// public DnaSetter(string name, float value, int ownerIndex, UMADnaBase owner, string category) { Name = name; Value = value; OwnerIndex = ownerIndex; Owner = owner; Category = category; } /// /// Set the current DNA value. You will need to rebuild the character to see /// the results change. /// public void Set(float val) { Value = val; Owner.SetValue(OwnerIndex, val); } /// /// Set the current DNA value. You will need to rebuild the character to see /// the results change. /// public void Set() { Owner.SetValue(OwnerIndex, Value); } /// /// Gets the current DNA value. /// public float Get() { return Owner.GetValue(OwnerIndex); } } } #endregion