本文整理汇总了C#中ParticleEmitter.DisposeAfterSeconds方法的典型用法代码示例。如果您正苦于以下问题:C# ParticleEmitter.DisposeAfterSeconds方法的具体用法?C# ParticleEmitter.DisposeAfterSeconds怎么用?C# ParticleEmitter.DisposeAfterSeconds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleEmitter
的用法示例。
在下文中一共展示了ParticleEmitter.DisposeAfterSeconds方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParticleTracksEmitterAcrossScreenFor4Seconds
public void ParticleTracksEmitterAcrossScreenFor4Seconds()
{
emitterData = new ParticleEmitterData
{
MaximumNumberOfParticles = 1,
SpawnInterval = 0.001f,
Size = new RangeGraph<Size>(new Size(0.1f)),
Color = new RangeGraph<Color>(Color.White),
ParticleMaterial = new Material(ShaderFlags.Position2DColoredTextured, "ImageAnimation"),
DoParticlesTrackEmitter = true
};
emitter = new ParticleEmitter(emitterData, new Vector2D(0.2f, 0.5f));
emitter.Start<MoveAcrossScreen>();
emitter.DisposeAfterSeconds(4);
AdvanceTimeAndUpdateEntities();
}
示例2: DisposeEmitterAfterSetTime
public void DisposeEmitterAfterSetTime()
{
emitterData = CreateDataAndEmitterWithAnimation("DeltaEngineLogo");
emitter = new ParticleEmitter(emitterData, Vector2D.Half);
emitter.DisposeAfterSeconds(0.1f);
AdvanceTimeAndUpdateEntities(0.25f);
emitter.DisposeAfterSeconds(0.1f);
Assert.IsFalse(emitter.IsActive);
}
示例3: DisposingTwiceDoesNotError
public void DisposingTwiceDoesNotError()
{
var emitter = new ParticleEmitter(GetEmitterData(spark, 512), Vector3D.Zero);
emitter.DisposeAfterSeconds(1);
emitter.DisposeAfterSeconds(1);
}
示例4: SpawnOneTimedBurst
public void SpawnOneTimedBurst()
{
var emitterData = GetEmitterData(spark, 512);
emitterData.SpawnInterval = 0.0007f;
var emitter = new ParticleEmitter(emitterData, Vector3D.Zero);
emitter.DisposeAfterSeconds(emitterData.LifeTime);
}
示例5: ParticleTracksEmitterAcrossScreenFor4Seconds
public void ParticleTracksEmitterAcrossScreenFor4Seconds()
{
var emitter = new ParticleEmitter(CreateTrackingParticleData(), Vector3D.Zero);
emitter.Start<MoveAcrossScreen>();
emitter.DisposeAfterSeconds(4);
}