当前位置: 首页>>代码示例>>C#>>正文


C# SceneManager.CreateParticleSystem方法代码示例

本文整理汇总了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);
        }
开发者ID:nigelchanyk,项目名称:Archetype,代码行数:11,代码来源:UniqueParticleSystem.cs

示例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;
        }
开发者ID:CharcoalStyles,项目名称:3DRL,代码行数:44,代码来源:Force+ball.cs


注:本文中的SceneManager.CreateParticleSystem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。