本文整理汇总了C#中ParticleSystem.SetDefaultDimensions方法的典型用法代码示例。如果您正苦于以下问题:C# ParticleSystem.SetDefaultDimensions方法的具体用法?C# ParticleSystem.SetDefaultDimensions怎么用?C# ParticleSystem.SetDefaultDimensions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleSystem
的用法示例。
在下文中一共展示了ParticleSystem.SetDefaultDimensions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateScene
// Just override the mandatory create scene method
public override void CreateScene()
{
// Set ambient light
sceneMgr.AmbientLight = new ColourValue(0.5f, 0.5f, 0.5f);
// Create a skybox
sceneMgr.SetSkyBox(true, "Examples/SpaceSkyBox", 50 );
// Create a light
Light l = sceneMgr.CreateLight("MainLight");
// Accept default settings: point light, white diffuse, just set position
// NB I could attach the light to a SceneNode if I wanted it to move automatically with
// other objects, but I don't
l.Position = new Vector3(20,80,50);
// Also add a nice starship in
Entity ent = sceneMgr.CreateEntity( "razor", "razor.mesh" );
sceneMgr.RootSceneNode.AttachObject( ent );
pThrusters = sceneMgr.CreateParticleSystem( "ParticleSys1", 200 );
pThrusters.MaterialName = "Examples/Flare";
pThrusters.SetDefaultDimensions( 25, 25 );
ParticleEmitter pEmit1 = pThrusters.AddEmitter( "Point" );
ParticleEmitter pEmit2 = pThrusters.AddEmitter( "Point" );
// Thruster 1
pEmit1.Angle = new Degree(3);
pEmit1.TimeToLive = 0.2f;
pEmit1.EmissionRate = 70;
pEmit1.ParticleVelocity = 50;
pEmit1.Direction = -Vector3.UNIT_Z;
pEmit1.SetColour(ColourValue.White, ColourValue.Red);
// Thruster 2
pEmit2.Angle = new Degree(3);
pEmit2.TimeToLive = 0.2f;
pEmit2.EmissionRate = 70;
pEmit2.ParticleVelocity = 50;
pEmit2.Direction = -Vector3.UNIT_Z;
pEmit2.SetColour(ColourValue.White, ColourValue.Red);
// Set the position of the thrusters
pEmit1.Position = new Vector3( 5.7f, 0.0f, 0.0f );
pEmit2.Position = new Vector3( -18.0f, 0.0f, 0.0f );
sceneMgr.RootSceneNode.CreateChildSceneNode( new Vector3( 0.0f, 6.5f, -67.0f ) )
.AttachObject(pThrusters);
}