Contents

init(dictionaryLiteral:automaticallyPlaysDefaultAnimation:)

Creates an animation library from a variadic list of key-value pairs

Declaration

init(dictionaryLiteral elements: (String, AnimationResource)..., automaticallyPlaysDefaultAnimation: Bool)

Parameters

  • elements:

    A list of key-value pairs that make up the dictionary. Each key is a unique animation name, and each value is an animation resource.

  • automaticallyPlaysDefaultAnimation:

    Whether to automatically play the default animation when the entity is added to a scene and enabled. When true, the animation system plays the default animation automatically. When false, animations require manual playback. See Automaticallyplaysdefaultanimation for details.

Discussion

Use the ExpressibleByDictionaryLiteral initializer by directly assigning the library to a dictionary literal.

See Also

Configuring default playback