C# Class DodongosQuest.ParticleSystem.ParticleSystem

Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Afficher le fichier Open project: faintpixel/Roguelike

Méthodes publiques

Свойство Type Description
_world World
particles DodongosQuest.ParticleSystem.Particle[]

Protected Properties

Свойство Type Description
maxAcceleration float
maxInitialSpeed float
maxLifetime float
maxNumParticles int
maxRotationSpeed float
maxScale float
minAcceleration float
minInitialSpeed float
minLifetime float
minNumParticles int
minRotationSpeed float
minScale float
spriteBlendMode Microsoft.Xna.Framework.Graphics.BlendState
textureFilename string

Méthodes publiques

Méthode Description
AddParticles ( Vector2 where, Vector2 direction ) : void
Draw ( GameTime gameTime ) : void
Initialize ( ) : void
Update ( GameTime gameTime ) : void

Méthodes protégées

Méthode Description
InitializeConstants ( ) : void
InitializeParticle ( Particle p, Vector2 where, Vector2 direction ) : void

Initializes a particle

LoadContent ( ) : void
ParticleSystem ( Game1 game, int howManyEffects ) : System
PickRandomDirection ( ) : Vector2

Method Details

AddParticles() public méthode

public AddParticles ( Vector2 where, Vector2 direction ) : void
where Vector2
direction Vector2
Résultat void

Draw() public méthode

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Initialize() public méthode

public Initialize ( ) : void
Résultat void

InitializeConstants() protected abstract méthode

protected abstract InitializeConstants ( ) : void
Résultat void

InitializeParticle() protected méthode

Initializes a particle
protected InitializeParticle ( Particle p, Vector2 where, Vector2 direction ) : void
p Particle
where Vector2
direction Vector2 set to null for a random direction for each particle
Résultat void

LoadContent() protected méthode

protected LoadContent ( ) : void
Résultat void

ParticleSystem() protected méthode

protected ParticleSystem ( Game1 game, int howManyEffects ) : System
game Game1
howManyEffects int
Résultat System

PickRandomDirection() protected méthode

protected PickRandomDirection ( ) : Vector2
Résultat Vector2

Update() public méthode

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Property Details

_world public_oe property

public World _world
Résultat World

maxAcceleration protected_oe property

protected float maxAcceleration
Résultat float

maxInitialSpeed protected_oe property

protected float maxInitialSpeed
Résultat float

maxLifetime protected_oe property

protected float maxLifetime
Résultat float

maxNumParticles protected_oe property

protected int maxNumParticles
Résultat int

maxRotationSpeed protected_oe property

protected float maxRotationSpeed
Résultat float

maxScale protected_oe property

protected float maxScale
Résultat float

minAcceleration protected_oe property

minAcceleration and maxAcceleration are used to control the acceleration of the particles. The particle's acceleration will be a random number between these two. By default, the direction of acceleration is the same as the direction of the initial velocity.
protected float minAcceleration
Résultat float

minInitialSpeed protected_oe property

minInitialSpeed and maxInitialSpeed are used to control the initial velocity of the particles. The particle's initial speed will be a random number between these two. The direction is determined by the function PickRandomDirection, which can be overriden.
protected float minInitialSpeed
Résultat float

minLifetime protected_oe property

minLifetime and maxLifetime are used to control the lifetime. Each particle's lifetime will be a random number between these two. Lifetime is used to determine how long a particle "lasts." Also, in the base implementation of Draw, lifetime is also used to calculate alpha and scale values to avoid particles suddenly "popping" into view
protected float minLifetime
Résultat float

minNumParticles protected_oe property

minNumParticles and maxNumParticles control the number of particles that are added when AddParticles is called. The number of particles will be a random number between minNumParticles and maxNumParticles.
protected int minNumParticles
Résultat int

minRotationSpeed protected_oe property

minRotationSpeed and maxRotationSpeed control the particles' angular velocity: the speed at which particles will rotate. Each particle's rotation speed will be a random number between minRotationSpeed and maxRotationSpeed. Use smaller numbers to make particle systems look calm and wispy, and large numbers for more violent effects.
protected float minRotationSpeed
Résultat float

minScale protected_oe property

to get some additional variance in the appearance of the particles, we give them all random scales. the scale is a value between minScale and maxScale, and is additionally affected by the particle's lifetime to avoid particles "popping" into view.
protected float minScale
Résultat float

particles public_oe property

public Particle[],DodongosQuest.ParticleSystem particles
Résultat DodongosQuest.ParticleSystem.Particle[]

spriteBlendMode protected_oe property

different effects can use different blend modes. fire and explosions work well with additive blending, for example.
protected BlendState,Microsoft.Xna.Framework.Graphics spriteBlendMode
Résultat Microsoft.Xna.Framework.Graphics.BlendState

textureFilename protected_oe property

this controls the texture that the particle system uses. It will be used as an argument to ContentManager.Load.
protected string textureFilename
Résultat string