1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using UnityEngine.Animations;
- using Unity.Collections;
- namespace Animancer
- {
-
-
-
-
-
-
-
-
-
- public class AnimatedInt : AnimatedProperty<AnimatedInt.Job, int>
- {
-
-
-
-
-
- public AnimatedInt(IAnimancerComponent animancer, int propertyCount,
- NativeArrayOptions options = NativeArrayOptions.ClearMemory)
- : base(animancer, propertyCount, options)
- { }
-
- public AnimatedInt(IAnimancerComponent animancer, string propertyName)
- : base(animancer, propertyName)
- { }
-
- public AnimatedInt(IAnimancerComponent animancer, params string[] propertyNames)
- : base(animancer, propertyNames)
- { }
-
- protected override void CreateJob()
- {
- _Job = new Job() { properties = _Properties, values = _Values };
- }
-
-
-
-
- public struct Job : IAnimationJob
- {
- public NativeArray<PropertyStreamHandle> properties;
- public NativeArray<int> values;
- public void ProcessRootMotion(AnimationStream stream) { }
- public void ProcessAnimation(AnimationStream stream)
- {
- for (int i = properties.Length - 1; i >= 0; i--)
- values[i] = properties[i].GetInt(stream);
- }
- }
-
- }
- }
|