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
public abstract class RegionInfluencer extends Influencer
It's anInfluencerwhich assigns a region of aTextureto the particles.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRegionInfluencer.AnimatedAssigns a region to the particles using the particle life percent to calculate the current index in theregionsarray.static classRegionInfluencer.AspectTextureRegionIt's a class used internally by theRegionInfluencerto represent a texture region.static classRegionInfluencer.RandomAssigns a random region ofregionsto the particles.static classRegionInfluencer.SingleAssigns the first region ofregionsto the particles.
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringatlasNameArray<RegionInfluencer.AspectTextureRegion>regions
-
Constructor Summary
Constructors Constructor Description RegionInfluencer()RegionInfluencer(int regionsCount)RegionInfluencer(TextureRegion... regions)All the regions must be defined on the same TextureRegionInfluencer(RegionInfluencer regionInfluencer)RegionInfluencer(Texture texture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(TextureRegion... regions)voidallocateChannels()Called during initialization to allocate additional particles channelsvoidclear()voidload(AssetManager manager, ResourceData resources)voidread(Json json, JsonValue jsonData)voidsave(AssetManager manager, ResourceData resources)voidsetAtlasName(java.lang.String atlasName)voidwrite(Json json)-
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent
activateParticles, copy, dispose, end, init, killParticles, set, start, update
-
-
-
-
Field Detail
-
regions
public Array<RegionInfluencer.AspectTextureRegion> regions
-
atlasName
public java.lang.String atlasName
-
-
Constructor Detail
-
RegionInfluencer
public RegionInfluencer(int regionsCount)
-
RegionInfluencer
public RegionInfluencer()
-
RegionInfluencer
public RegionInfluencer(TextureRegion... regions)
All the regions must be defined on the same Texture
-
RegionInfluencer
public RegionInfluencer(Texture texture)
-
RegionInfluencer
public RegionInfluencer(RegionInfluencer regionInfluencer)
-
-
Method Detail
-
setAtlasName
public void setAtlasName(java.lang.String atlasName)
-
add
public void add(TextureRegion... regions)
-
clear
public void clear()
-
load
public void load(AssetManager manager, ResourceData resources)
- Specified by:
loadin interfaceResourceData.Configurable- Overrides:
loadin classParticleControllerComponent
-
save
public void save(AssetManager manager, ResourceData resources)
- Specified by:
savein interfaceResourceData.Configurable- Overrides:
savein classParticleControllerComponent
-
allocateChannels
public void allocateChannels()
Description copied from class:ParticleControllerComponentCalled during initialization to allocate additional particles channels- Overrides:
allocateChannelsin classParticleControllerComponent
-
write
public void write(Json json)
- Specified by:
writein interfaceJson.Serializable- Overrides:
writein classParticleControllerComponent
-
read
public void read(Json json, JsonValue jsonData)
- Specified by:
readin interfaceJson.Serializable- Overrides:
readin classParticleControllerComponent
-
-