Class TweenStaticAccessorPlugin
Default accessor plugin using user-provided accessor methods.
Inheritance
System.Object
TweenStaticAccessorPlugin
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Sttz.Tweener.Core
Assembly: cs.temp.dll.dll
Syntax
public static class TweenStaticAccessorPlugin
Remarks
To access properties on arbitrary objects without using reflection, this plugin allows the user to provide getter and setter callbacks. This allows Animate to be used without using reflection or codegen but requires a bit of setup for each property that is tweened.
It also allows to set up virtual properties that don't actually exist on a type and do some additional processing. E.g. defining a "position.x" on Transform to tween only the x coordinate.
Methods
EnableAccess<TTarget, TValue>(String, TweenStaticAccessorPlugin.GetAccessor<TTarget, TValue>, TweenStaticAccessorPlugin.SetAccessor<TTarget, TValue>)
Teach the static accessor plugin to access a property on a type.
Declaration
public static void EnableAccess<TTarget, TValue>(string propertyName, TweenStaticAccessorPlugin.GetAccessor<TTarget, TValue> getter, TweenStaticAccessorPlugin.SetAccessor<TTarget, TValue> setter)
where TTarget : class
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | |
TweenStaticAccessorPlugin.GetAccessor<TTarget, TValue> | getter | |
TweenStaticAccessorPlugin.SetAccessor<TTarget, TValue> | setter |
Type Parameters
Name | Description |
---|---|
TTarget | |
TValue |
See Also
Loader(Tween, Boolean)
TweenStaticAccessorPlugin plugin loader.
Declaration
public static PluginResult Loader(Tween tween, bool required)
Parameters
Type | Name | Description |
---|---|---|
Tween | tween | |
System.Boolean | required |
Returns
Type | Description |
---|---|
PluginResult |
Remarks
Pass this method to EnablePlugin(PluginLoader, Nullable<Boolean>, Nullable<Boolean>) to enable the plugin for the options scope.