Class ParticlesProviderBase
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
A base class for all particle providers.
public abstract class ParticlesProviderBase : IParticlePropertiesProvider
- Inheritance
-
ParticlesProviderBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
Async
If true, will be be spawned in the async particle system, which does not affect main game performance, recommended for large quantities of particles, slightly less optimal for particles that spawn very often
public bool Async { get; }
Property Value
BlueEvolve
Gets the evolving blue value of the particle.
public virtual EvolvingNatFloat BlueEvolve { get; }
Property Value
Bounciness
public float Bounciness { get; set; }
Property Value
DeathParticles
Gets the death particle for this type of particle.
public IParticlePropertiesProvider[] DeathParticles { get; }
Property Value
DieInAir
Whether or not the particle dies in air.
public virtual bool DieInAir { get; }
Property Value
DieInLiquid
Determines whether or not the particle dies in liquid
public virtual bool DieInLiquid { get; }
Property Value
DieOnRainHeightmap
If true, particle dies if it falls below the rain height at its given location
public bool DieOnRainHeightmap { get; set; }
Property Value
GravityEffect
Gets the gravity effect on the particle.
public virtual float GravityEffect { get; }
Property Value
GreenEvolve
Gets the evolving green value of the particle.
public virtual EvolvingNatFloat GreenEvolve { get; }
Property Value
LifeLength
gets the life length of the particle.
public virtual float LifeLength { get; }
Property Value
LightEmission
If this particle emits light, this is its RGBA. Does not actually brighten the scene around it, but prevents incorrect lighting of particles when everything else around it is dark
public int LightEmission { get; set; }
Property Value
OpacityEvolve
Gets the evolving opacity value of the particle.
public virtual EvolvingNatFloat OpacityEvolve { get; }
Property Value
- EvolvingNatFloat
An evolving value based on opacity.
ParentVelocity
public Vec3f ParentVelocity { get; set; }
Property Value
ParentVelocityWeight
public float ParentVelocityWeight { get; set; }
Property Value
ParticleModel
Gets the model type of the particle.
public virtual EnumParticleModel ParticleModel { get; }
Property Value
Pos
Gets the position of particles.
public virtual Vec3d Pos { get; }
Property Value
Quantity
Gets the quantity of particles.
public virtual float Quantity { get; }
Property Value
RandomVelocityChange
public bool RandomVelocityChange { get; set; }
Property Value
RedEvolve
Gets the evolving red value of the particle.
public virtual EvolvingNatFloat RedEvolve { get; }
Property Value
SecondaryParticles
Gets the secondary particle type for this particle.
public virtual IParticlePropertiesProvider[] SecondaryParticles { get; }
Property Value
SecondarySpawnInterval
Gets the secondary particle spawn interval.
public virtual float SecondarySpawnInterval { get; }
Property Value
SelfPropelled
Whether or not the particle is self-propelled.
public virtual bool SelfPropelled { get; }
Property Value
Size
gets the size of the particle.
public virtual float Size { get; }
Property Value
SizeEvolve
gets the dynamic size of the particle.
public virtual EvolvingNatFloat SizeEvolve { get; }
Property Value
SwimOnLiquid
public virtual bool SwimOnLiquid { get; }
Property Value
TerrainCollision
Whether or not the particle collides with the terrain or not.
public bool TerrainCollision { get; }
Property Value
VelocityEvolve
Get the dynamic speeds of the particle.
public virtual EvolvingNatFloat[] VelocityEvolve { get; }
Property Value
VertexFlags
gets the glow level of the particle.
public virtual int VertexFlags { get; }
Property Value
WindAffected
public bool WindAffected { get; set; }
Property Value
Methods
BeginParticle()
Called just before a new particle is being created. You can use this to produce e.g. alternating kinds of particles
public virtual void BeginParticle()
FromBytes(BinaryReader, IWorldAccessor)
How the particle is read from the save.
public virtual void FromBytes(BinaryReader reader, IWorldAccessor resolver)
Parameters
reader
BinaryReaderresolver
IWorldAccessor
GetRgbaColor(ICoreClientAPI)
Gets the color of the particle.
public virtual int GetRgbaColor(ICoreClientAPI capi)
Parameters
capi
ICoreClientAPI
Returns
GetVelocity(Vec3d)
Gets the velocity of the particles.
public virtual Vec3f GetVelocity(Vec3d pos)
Parameters
pos
Vec3d
Returns
Init(ICoreAPI)
Called before the particle provider is used for particle creation
public virtual void Init(ICoreAPI api)
Parameters
api
ICoreAPI
PrepareForSecondarySpawn(ParticleBase)
Updates instance related state for secondary particles based on the given parent particle instance
public virtual void PrepareForSecondarySpawn(ParticleBase particleInstance)
Parameters
particleInstance
ParticleBaseThe parent IParticleInstance from which this secondary particle is being spawned
ToBytes(BinaryWriter)
How the particle is written to the save. (if it is)
public virtual void ToBytes(BinaryWriter writer)
Parameters
writer
BinaryWriter