namespace Fusion.Addons.AnimationController { using System; public delegate void InterpolationDelegate(AnimationInterpolationInfo interpolationInfo); /// /// Attribute to automatically synchronize animation properties. /// Interpolation delegate is optional and can be used if you need the property to be interpolated in render. /// // // Example usage: // // [AnimationProperty(nameof(InterpolateMyProperty))] // public int MyProperty; // // private void InterpolateMyProperty(AnimationInterpolationInfo interpolationInfo) // { // // Write interpolation here. // // Use a different property for interpolated value. // // For example: InterpolatedMyProperty // } // [AttributeUsage(AttributeTargets.Field)] public sealed class AnimationPropertyAttribute : Attribute { public readonly string InterpolationDelegate; public AnimationPropertyAttribute() { } public AnimationPropertyAttribute(string interpolationDelegate) { InterpolationDelegate = interpolationDelegate; } } }