read static method

ComponentAnimation read(
  1. StreamReader reader,
  2. List<ActorComponent?> components
)

Implementation

static ComponentAnimation read(
    StreamReader reader, List<ActorComponent?> components) {
  reader.openObject('component');
  ComponentAnimation componentAnimation =
      ComponentAnimation(reader.readId('component'));
  int numProperties = reader.readUint16Length();
  for (int i = 0; i < numProperties; i++) {
    assert(componentAnimation._componentIndex < components.length);
    componentAnimation._properties.add(PropertyAnimation.read(
        reader, components[componentAnimation._componentIndex]));
  }
  reader.closeObject();

  return componentAnimation;
}