siege.particle

Easing

class Easing
BackIn = siege.particle.Easing.BackIn
BackInOut = siege.particle.Easing.BackInOut
BackOut = siege.particle.Easing.BackOut
BounceIn = siege.particle.Easing.BounceIn
BounceInOut = siege.particle.Easing.BounceInOut
BounceOut = siege.particle.Easing.BounceOut
CircularIn = siege.particle.Easing.CircularIn
CircularInOut = siege.particle.Easing.CircularInOut
CircularOut = siege.particle.Easing.CircularOut
CubicIn = siege.particle.Easing.CubicIn
CubicInOut = siege.particle.Easing.CubicInOut
CubicOut = siege.particle.Easing.CubicOut
ElasticIn = siege.particle.Easing.ElasticIn
ElasticInOut = siege.particle.Easing.ElasticInOut
ElasticOut = siege.particle.Easing.ElasticOut
ExponentialIn = siege.particle.Easing.ExponentialIn
ExponentialInOut = siege.particle.Easing.ExponentialInOut
ExponentialOut = siege.particle.Easing.ExponentialOut
LinearIn = siege.particle.Easing.LinearIn
LinearInOut = siege.particle.Easing.LinearInOut
LinearOut = siege.particle.Easing.LinearOut
None = siege.particle.Easing.None
QuadraticIn = siege.particle.Easing.QuadraticIn
QuadraticInOut = siege.particle.Easing.QuadraticInOut
QuadraticOut = siege.particle.Easing.QuadraticOut
QuarticIn = siege.particle.Easing.QuarticIn
QuarticInOut = siege.particle.Easing.QuarticInOut
QuarticOut = siege.particle.Easing.QuarticOut
QuinticIn = siege.particle.Easing.QuinticIn
QuinticInOut = siege.particle.Easing.QuinticInOut
QuinticOut = siege.particle.Easing.QuinticOut
SineIn = siege.particle.Easing.SineIn
SineInOut = siege.particle.Easing.SineInOut
SineOut = siege.particle.Easing.SineOut

TweenType

class TweenType
List = siege.particle.TweenType.List
Ranged = siege.particle.TweenType.Ranged
Static = siege.particle.TweenType.Static

Particle

class Particle
alpha
TweenProperty of this particle’s alpha
color
TweenProperty of this particle’s color
coords
Texture coordinates for this Particle
lifetime
Timer that holds total life of this Particle
position
X,Y coordinates of this Particle
rotation
TweenProperty of this particle’s rotation
scale
TweenProperty of this particle’s scale
x
TweenProperty of this particle’s x velocity
y
TweenProperty of this particle’s y velocity

PhysicsParticle

class PhysicsParticle

Tween

class Tween
chain(value)
Parameters:value (float) –
Return type:Tween
chain(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

Tween

chainList(values)
Parameters:values (list) –
Return type:Tween
chainList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

Tween

chainRange(valueRange)
Parameters:valueRange (RangeFloat) –
Return type:Tween
chainRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

Tween

delay(duration)

Delays the start of this tween by provided milliseconds.

Parameters:duration (RangeUint) –
Return type:Tween
loop([times=-1[, duration=0]])

Loops the tween for the specified number of times or duration.

Parameters:
Return type:

Tween

set(value)
Parameters:value (float) –
Return type:Tween
set(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
  • start (float) –
  • end (float) –
  • easing (Easing) –
  • duration (RangeUint) –
Return type:

Tween

setList(values)
Parameters:values (list) –
Return type:Tween
setList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
  • start (list) –
  • end (list) –
  • easing (Easing) –
  • duration (RangeUint) –
Return type:

Tween

setRange(valueRange)
Parameters:valueRange (RangeFloat) –
Return type:Tween
setRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
Return type:

Tween

TweenColor

class TweenColor
chain(value)
Parameters:value (Color) –
Return type:TweenColor
chain(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenColor

chainList(values)
Parameters:values (list) –
Return type:TweenColor
chainList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenColor

chainRange(valueRange)
Parameters:valueRange (RangeColor) –
Return type:TweenColor
chainRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenColor

delay(duration)

Delays the start of this tween by provided milliseconds.

Parameters:duration (RangeUint) –
Return type:TweenColor
loop([times=-1[, duration=0]])

Loops the tween for the specified number of times or duration.

Parameters:
Return type:

TweenColor

set(value)
Parameters:value (Color) –
Return type:TweenColor
set(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
Return type:

TweenColor

setList(values)
Parameters:values (list) –
Return type:TweenColor
setList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
  • start (list) –
  • end (list) –
  • easing (Easing) –
  • duration (RangeUint) –
Return type:

TweenColor

setRange(valueRange)
Parameters:valueRange (RangeColor) –
Return type:TweenColor
setRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
Return type:

TweenColor

TweenUint8

class TweenUint8
chain(value)
Parameters:value (int) –
Return type:TweenUint8
chain(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenUint8

chainList(values)
Parameters:values (list) –
Return type:TweenUint8
chainList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenUint8

chainRange(valueRange)
Parameters:valueRange (RangeUint8) –
Return type:TweenUint8
chainRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenUint8

delay(duration)

Delays the start of this tween by provided milliseconds.

Parameters:duration (RangeUint) –
Return type:TweenUint8
loop([times=-1[, duration=0]])

Loops the tween for the specified number of times or duration.

Parameters:
Return type:

TweenUint8

set(value)
Parameters:value (int) –
Return type:TweenUint8
set(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
  • start (int) –
  • end (int) –
  • easing (Easing) –
  • duration (RangeUint) –
Return type:

TweenUint8

setList(values)
Parameters:values (list) –
Return type:TweenUint8
setList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
  • start (list) –
  • end (list) –
  • easing (Easing) –
  • duration (RangeUint) –
Return type:

TweenUint8

setRange(valueRange)
Parameters:valueRange (RangeUint8) –
Return type:TweenUint8
setRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
Return type:

TweenUint8

TweenVector

class TweenVector
chain(value)
Parameters:value (Vector) –
Return type:TweenVector
chain(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenVector

chainList(values)
Parameters:values (list) –
Return type:TweenVector
chainList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenVector

chainRange(valueRange)
Parameters:valueRange (RangeVector) –
Return type:TweenVector
chainRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0[, delay=0]]])
Parameters:
Return type:

TweenVector

delay(duration)

Delays the start of this tween by provided milliseconds.

Parameters:duration (RangeUint) –
Return type:TweenVector
loop([times=-1[, duration=0]])

Loops the tween for the specified number of times or duration.

Parameters:
Return type:

TweenVector

set(value)
Parameters:value (Vector) –
Return type:TweenVector
set(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
Return type:

TweenVector

setList(values)
Parameters:values (list) –
Return type:TweenVector
setList(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
  • start (list) –
  • end (list) –
  • easing (Easing) –
  • duration (RangeUint) –
Return type:

TweenVector

setRange(valueRange)
Parameters:valueRange (RangeVector) –
Return type:TweenVector
setRange(start, end[, easing=siege.particle.Easing.LinearIn[, duration=0]])
Parameters:
Return type:

TweenVector

ParticleEmitter

class ParticleEmitter
__init__(realmUid, loopWidth, position[, lifetime=1[, rate=0[, amount=1[, texturePath='']]]])
Parameters:
  • realmUid (int) –
  • loopWidth (int) –
  • position (Vector) –
  • lifetime (int) –
  • rate (int) –
  • amount (int) –
  • texturePath (str) –
addLightSource([intensity=128[, decay=0[, brightness=1[, color=<siege.graphic.Color[, size=1]]]]])
Parameters:
  • intensity (int) –
  • decay (int) –
  • brightness (float) –
  • color (Color) –
  • size (int) –
animate(frames[, loop=1])

Animates the particles with the given frames and frame times.

Parameters:
  • frames (list) – (tuple) A tuple in the following format (PixelRect, int).
  • loop (int) – Number of times to loop. Defaults to 1 with a special case of 0 which means infinite.
attachTo(Entity)

Attaches this ParticleEmitter to an Entity. Position is now relative to that Entity

Parameters:Entity (Entity) –
createParticle()

Returns a newly created Particle.

Return type:Particle
getCount()

Return the number of Particles this ParticleEmitter tracks

Return type:int
getPosition()

If attached to an Entity, return position relative to that Entity. Otherwise return Position

Return type:Vector
render(window)

Draw all Particles in this ParticleEmitter

Parameters:window (sfRenderTarget) – The window to draw on
setLightSource(arg2)
Parameters:arg2 (LightSourceData) –
setParticleArea(arg2)
Parameters:arg2 (Rect) –
setParticlePositions(arg2)
Parameters:arg2 (list) –
setPosition(position)

Changes X,Y coordinates to position

Parameters:position (Vector) – X,Y coordinates to change to
setTexture(texture[, coords=[]])

Change ParticleEmitter’s Texture and corresponding coordinates

Parameters:
  • texture (Texture) – The Texture to change to
  • coords (list) – List of coordinates to give to the Texture
update(frameTime)

Updates all Particles in this ParticleEmitter

Parameters:frameTime (int) – elapsed time this frame
updateLife(frameTime)

Updates only the lifetime and the lifetime of all Particles in this ParticleEmitter:param frameTime: elapsed time this frame

Parameters:frameTime (int) –
Return type:bool
alpha
(TweenUint8) Tween used to determine the color of particles.
amount
Amount of Particles to create each spawn
color
(TweenColor) Tween used to determine the color of particles.
lastEmission
Time of last spawn
lifetime
Timer to track total life of this ParticleEmitter
particleLife
A Range of lengths of time used for initial Particle life times
rate
Elapsed time to pass before spawning more Particles
realmUid
rotation
(Tween) Tween used to determine the rotation of particles.
scale
(TweenVector) Tween used to determine the scale of particles.
texture
Texture to draw for each Particle
x
(Tween) Tween used to determine the x velocity of particles.
y
(Tween) Tween used to determine the y velocity of particles.

PhysicsParticleEmitter

class PhysicsParticleEmitter
__init__(realmUid, loopWidth, position[, lifetime=1[, rate=0[, amount=1[, texturePath='']]]])
Parameters:
  • realmUid (int) –
  • loopWidth (int) –
  • position (Vector) –
  • lifetime (int) –
  • rate (int) –
  • amount (int) –
  • texturePath (str) –
destroyOnCollision
Destroy the particles when they collide with something
fallCap
Sets the fallcap Vector for Particles in this emitter
friction
Sets the friction Vector for Particles in this emitter
gravity
Sets the gravity Vector for Particles in this emitter
restitution
Sets the restitution Vector for Particles in this emitter

Renderable)

Renderable)

Renderable)

Renderable)