Package dev.prozilla.pine.core.entity
Interface EntityProvider
- All Superinterfaces:
EntityContext
- All Known Subinterfaces:
TileProvider
- All Known Implementing Classes:
AnimationData,AudioEffectPlayer,AudioPlayer,BorderImage,ButtonNode,CameraControlData,CameraData,Component,DevConsoleData,DynamicText,FrameNode,GridGroup,ImageNode,LayoutNode,LayoutNodeStyle,MultiTileRenderer,Node,NodeRoot,NodeStyle,NodeStyleBase,ParticleBurstEmitter,ParticleEmitter,ParticleFlowEmitter,ParticleRenderer,PhantomTile,RectRenderer,SpriteRenderer,TextInputNode,TextNode,TileRenderer,TooltipNode,Transform
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@ProviderOf(Entity.class)
@FunctionalInterface
public interface EntityProvider
extends EntityContext
Interface with utility methods for finding certain entities in the current context.
-
Method Summary
Modifier and TypeMethodDescriptiondefault EntitygetChild(int i) default EntitygetChildWithTag(String tag) Gets a child entity with a given tag.default Entitydefault Entitydefault EntitygetParentWithTag(String tag) Gets a parent entity with a given tag.default Transformdefault booleanisDescendantOf(Transform parent) Methods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOf
-
Method Details
-
getEntity
Entity getEntity() -
getTransform
-
getFirstChild
- Specified by:
getFirstChildin interfaceEntityContext
-
getLastChild
- Specified by:
getLastChildin interfaceEntityContext
-
getChild
- Specified by:
getChildin interfaceEntityContext
-
isDescendantOf
- Specified by:
isDescendantOfin interfaceEntityContext
-
getChildWithTag
Description copied from interface:EntityContextGets a child entity with a given tag.- Specified by:
getChildWithTagin interfaceEntityContext- Parameters:
tag- Tag of the child entity.- Returns:
- The child entity with the given tag, or null if there isn't one.
-
getParentWithTag
Description copied from interface:EntityContextGets a parent entity with a given tag.- Specified by:
getParentWithTagin interfaceEntityContext- Parameters:
tag- Tag of the parent entity.- Returns:
- The parent entity with the given tag, or null if there isn't one.
-