public void Apply(SPAnim anim, AnimSettingsMask mask)
 {
     if ((mask & AnimSettingsMask.Weight) != 0)
     {
         anim.Weight = this.weight;
     }
     if ((mask & AnimSettingsMask.Speed) != 0)
     {
         anim.Speed = this.speed;
     }
     if ((mask & AnimSettingsMask.Layer) != 0)
     {
         anim.Layer = this.layer;
     }
     if ((mask & AnimSettingsMask.WrapMode) != 0)
     {
         anim.WrapMode = this.wrapMode;
     }
     if ((mask & AnimSettingsMask.BlendMode) != 0)
     {
         anim.BlendMode = this.blendMode;
     }
     if ((mask & AnimSettingsMask.TimeSupplier) != 0)
     {
         anim.TimeSupplier = this.timeSupplier.TimeSupplier;
     }
 }
 public void Apply(AnimationState anim, AnimSettingsMask mask)
 {
     if ((mask & AnimSettingsMask.Weight) != 0)
     {
         anim.weight = this.weight;
     }
     if ((mask & AnimSettingsMask.Speed) != 0)
     {
         anim.speed = this.speed;
     }
     if ((mask & AnimSettingsMask.Layer) != 0)
     {
         anim.layer = this.layer;
     }
     if ((mask & AnimSettingsMask.WrapMode) != 0)
     {
         anim.wrapMode = this.wrapMode;
     }
     if ((mask & AnimSettingsMask.BlendMode) != 0)
     {
         anim.blendMode = this.blendMode;
     }
     if ((mask & AnimSettingsMask.TimeSupplier) != 0 && this.timeSupplier.IsCustom)
     {
         anim.speed = this.speed * SPTime.GetInverseScale(this.timeSupplier.TimeSupplier);
     }
 }
 public void Apply(ISPAnim anim, AnimSettingsMask mask)
 {
     if (anim is SPAnim)
     {
         this.Apply(anim as SPAnim, mask);
         return;
     }
     //can't set weight
     if ((mask & AnimSettingsMask.Speed) != 0)
     {
         anim.Speed = this.speed;
     }
     if ((mask & AnimSettingsMask.Layer) != 0)
     {
         anim.Layer = this.layer;
     }
     if ((mask & AnimSettingsMask.WrapMode) != 0)
     {
         anim.WrapMode = this.wrapMode;
     }
     //can't set blend mode
     if ((mask & AnimSettingsMask.TimeSupplier) != 0)
     {
         anim.TimeSupplier = this.timeSupplier.TimeSupplier;
     }
 }
 void ISerializationCallbackReceiver.OnBeforeSerialize()
 {
     if (_applyCustomSettings)
     {
         _applyCustomSettings = false;
         _settingsMask        = (AnimSettingsMask)(-1);
     }
 }
 public static AnimSettings Intersect(AnimSettings settings, AnimSettings with, AnimSettingsMask mask)
 {
     if ((mask & AnimSettingsMask.Weight) != 0)
     {
         settings.weight = with.weight;
     }
     if ((mask & AnimSettingsMask.Speed) != 0)
     {
         settings.speed = with.speed;
     }
     if ((mask & AnimSettingsMask.Layer) != 0)
     {
         settings.layer = with.layer;
     }
     if ((mask & AnimSettingsMask.WrapMode) != 0)
     {
         settings.wrapMode = with.wrapMode;
     }
     if ((mask & AnimSettingsMask.BlendMode) != 0)
     {
         settings.blendMode = with.blendMode;
     }
     if ((mask & AnimSettingsMask.TimeSupplier) != 0)
     {
         settings.timeSupplier = with.timeSupplier;
     }
     return(settings);
 }