本文整理汇总了C#中SceneManager.CreateParticleSystem方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.CreateParticleSystem方法的具体用法?C# SceneManager.CreateParticleSystem怎么用?C# SceneManager.CreateParticleSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneManager
的用法示例。
在下文中一共展示了SceneManager.CreateParticleSystem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UniqueParticleSystem
public UniqueParticleSystem(SceneManager sceneManager, SceneNode worldNode, string templateName)
{
ParticleSystem = sceneManager.CreateParticleSystem("UniqueParticleSystem" + Guid.NewGuid().ToString(), templateName);
ReferenceEmitters = ParticleSystem.GetParticleEmitterEnumerable().ToArray();
foreach (ParticleEmitter emitter in ReferenceEmitters)
emitter.Enabled = false;
ParticleQuotaPerEmitter = ParticleSystem.ParticleQuota;
SceneNode = worldNode.CreateChildSceneNode();
SceneNode.AttachObject(ParticleSystem);
}
示例2: ForceBall
public ForceBall(SceneManager sceneManager, MogreNewt.World physicsWorld, float tempSize, int own)
{
MogreNewt.ConvexCollision col;
Mogre.Vector3 offset;
Mogre.Vector3 inertia;
unique++;
// Create the visible mesh (no physics)
ent = sceneManager.CreateEntity("forceball" + unique, "Sph.mesh");
sn = sceneManager.RootSceneNode.CreateChildSceneNode();
sn.AttachObject(ent);
Console.WriteLine("end ball create");
size = tempSize;
sn.SetScale(size, size, size);
// Create the collision hull
col = new MogreNewt.CollisionPrimitives.ConvexHull(physicsWorld, sn);
col.calculateInertialMatrix(out inertia, out offset);
// Create the physics body. This body is what you manipulate. The graphical Ogre scenenode is automatically synced with the physics body
body = new MogreNewt.Body(physicsWorld, col);
col.Dispose();
//body.setPositionOrientation(new Vector3(0, 10, 0), Quaternion.IDENTITY);
body.attachToNode(sn);
body.setContinuousCollisionMode(1);
body.setMassMatrix(mass, mass * inertia);
body.IsGravityEnabled = true;
body.setUserData(this);
trail = sceneManager.CreateParticleSystem("awesome" + StringConverter.ToString(unique), "Char/Smoke");
trail.CastShadows = true;
trail.GetEmitter(0).EmissionRate = 100;
sn.AttachObject(trail);
Console.WriteLine("player stuff");
owner = own;
Player tempP = (Player)Program.p1;
colour = tempP.cv;
}