Class RegionInfluencer
java.lang.Object
com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent
com.badlogic.gdx.graphics.g3d.particles.influencers.Influencer
com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer
- All Implemented Interfaces:
ResourceData.Configurable
,Disposable
,Json.Serializable
- Direct Known Subclasses:
RegionInfluencer.Animated
,RegionInfluencer.Random
,RegionInfluencer.Single
It's an
Influencer
which assigns a region of a Texture
to the particles.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Assigns a region to the particles using the particle life percent to calculate the current index in theregions
array.static class
It's a class used internally by theRegionInfluencer
to represent a texture region.static class
Assigns a random region ofregions
to the particles.static class
Assigns the first region ofregions
to the particles. -
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionRegionInfluencer
(int regionsCount) RegionInfluencer
(TextureRegion... regions) All the regions must be defined on the same TextureRegionInfluencer
(RegionInfluencer regionInfluencer) RegionInfluencer
(Texture texture) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(TextureRegion... regions) void
Called during initialization to allocate additional particles channelsvoid
clear()
void
load
(AssetManager manager, ResourceData resources) void
void
save
(AssetManager manager, ResourceData resources) void
setAtlasName
(String atlasName) void
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent
activateParticles, copy, dispose, end, init, killParticles, set, start, update
-
Field Details
-
regions
-
atlasName
-
-
Constructor Details
-
RegionInfluencer
public RegionInfluencer(int regionsCount) -
RegionInfluencer
public RegionInfluencer() -
RegionInfluencer
All the regions must be defined on the same Texture -
RegionInfluencer
-
RegionInfluencer
-
-
Method Details
-
setAtlasName
-
add
-
clear
public void clear() -
load
- Specified by:
load
in interfaceResourceData.Configurable
- Overrides:
load
in classParticleControllerComponent
-
save
- Specified by:
save
in interfaceResourceData.Configurable
- Overrides:
save
in classParticleControllerComponent
-
allocateChannels
public void allocateChannels()Description copied from class:ParticleControllerComponent
Called during initialization to allocate additional particles channels- Overrides:
allocateChannels
in classParticleControllerComponent
-
write
- Specified by:
write
in interfaceJson.Serializable
- Overrides:
write
in classParticleControllerComponent
-
read
- Specified by:
read
in interfaceJson.Serializable
- Overrides:
read
in classParticleControllerComponent
-