Class SpritePrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.sprite.SpritePrefab
- Direct Known Subclasses:
ParticlePrefab,TilePrefab
Prefab for 2D sprite entities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Colorprotected booleanprotected Vector2fprotected Vector2fprotected Vector2fprotected TextureBase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds this prefab's predefined components to a given entity and copies values from this prefab.voidvoidsetRegion(float x, float y, float width, float height) Crops the sprite to a given region.voidMethods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
addChild, addChildren, addChildren, instantiate, instantiate, removeChild, setActive, setName, setTag
-
Field Details
-
texture
-
color
-
scale
-
cropToRegion
protected boolean cropToRegion -
regionOffset
-
regionSize
-
-
Constructor Details
-
SpritePrefab
-
SpritePrefab
-
-
Method Details
-
setRegion
public void setRegion(float x, float y, float width, float height) Crops the sprite to a given region. -
setScale
-
setColor
-
apply
Description copied from class:PrefabAdds this prefab's predefined components to a given entity and copies values from this prefab.
-