Interface SpriteContentsConstructor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface representing the signature of the SpriteContents constructor
but nullable to support skipping based on metadata.
-
Method Summary
Modifier and TypeMethodDescription@Nullable SpriteContentscreate(Identifier id, FrameSize frameSize, NativeImage nativeImage, Optional<AnimationMetadataSection> animationMetadata, List<MetadataSectionType.WithValue<?>> additionalMetadata, Optional<TextureMetadataSection> textureMetadata) Construct an instance of SpriteContents or return null to not load the sprite.
-
Method Details
-
create
@Nullable SpriteContents create(Identifier id, FrameSize frameSize, NativeImage nativeImage, Optional<AnimationMetadataSection> animationMetadata, List<MetadataSectionType.WithValue<?>> additionalMetadata, Optional<TextureMetadataSection> textureMetadata) Construct an instance of SpriteContents or return null to not load the sprite.- Parameters:
id- the id of the spriteframeSize- the frame size of the spritenativeImage- the image of the spriteanimationMetadata- the sprite's animation metadataadditionalMetadata- additional metadata loaded from the resourcetextureMetadata- texture metadata (i.e. mip map strategy)- Returns:
- an instance of SpriteContents or return null to not load the sprite
-