コード例 #1
0
 public void RemoveFromScene()
 {
     if (inScene)
     {
         if (displayParticle != null)
         {
             displayParticle.Dispose();
             displayParticle = null;
         }
     }
     inScene = false;
 }
コード例 #2
0
        public void AddToScene()
        {
            if (app.DisplayParticleEffects && !inScene)
            {
                if (attachmentPointName != null)
                {
                    DisplayObject parentObj = (parent as StaticObject).DisplayObject;
                    displayParticle             = new DisplayParticleSystem(particleEffectName, app.Scene, particleEffectName, velocityScale, particleScale, parentObj, attachmentPointName);
                    displayParticle.Orientation = this.Orientation;
                }
                else
                {
                    Vector3 scale    = new Vector3(1, 1, 1);
                    Vector3 rotation = Vector3.Zero;
                    displayParticle             = new DisplayParticleSystem(particleEffectName, app.Scene, particleEffectName, ParentPosition, scale, rotation, velocityScale, particleScale);
                    displayParticle.Orientation = this.Orientation;
                }
                inScene = true;

                // displayParticle.Highlight = Highlight;
            }
        }
コード例 #3
0
 public void RemoveFromScene()
 {
     if (inScene)
     {
         if (displayParticle != null)
         {
             displayParticle.Dispose();
             displayParticle = null;
         }
     }
     inScene = false;
 }
コード例 #4
0
        public void AddToScene()
        {
            if (app.DisplayParticleEffects && !inScene)
            {
                if (attachmentPointName != null)
                {
                    DisplayObject parentObj = (parent as StaticObject).DisplayObject;
                    displayParticle = new DisplayParticleSystem(particleEffectName, app.Scene, particleEffectName, velocityScale, particleScale, parentObj, attachmentPointName);
                    displayParticle.Orientation = this.Orientation;
                }
                else
                {
                    Vector3 scale = new Vector3(1, 1, 1);
                    Vector3 rotation = Vector3.Zero;
                    displayParticle = new DisplayParticleSystem(particleEffectName, app.Scene, particleEffectName, ParentPosition, scale, rotation, velocityScale, particleScale);
                    displayParticle.Orientation = this.Orientation;
                }
                inScene = true;

                // displayParticle.Highlight = Highlight;
            }
        }