setValue method

  1. @override
void setValue(
  1. ActorComponent? component,
  2. double value,
  3. double mix
)
override

Implementation

@override
void setValue(ActorComponent? component, double value, double mix) {
  ActorImage node = component as ActorImage;
  int frameIndex = value.floor() % node.sequenceFrames!.length;
  if (frameIndex < 0) {
    frameIndex += node.sequenceFrames!.length;
  }
  node.sequenceFrame = frameIndex;
}