Esempio n. 1
0
        public ParticleSystemSource Clone()
        {
            ReloadTextures();
            ParticleSystemSource temp = (ParticleSystemSource)this.MemberwiseClone();

            temp.livingParticles          = new List <Particle>();
            temp.containedParticleSystems = new List <ParticleSystemSource>();

            return(temp);
        }
Esempio n. 2
0
 public Particle(int lifeTime, int frameIndex, float rotation, float rotationSpeed, float scale, float maxVelocity, float spawnRotation, ParticleSystemSource.ParticleStyle particleStyle, Point spawnPoint, ParticleSystemSource system)
 {
     parentSystem     = system;
     this.lifeTime    = lifeTime;
     this.frameIndex  = frameIndex;
     this.rotation    = rotation;
     this.scale       = scale;
     this.maxVelocity = maxVelocity;
     if (particleStyle != ParticleSystemSource.ParticleStyle.Explosion || particleStyle != ParticleSystemSource.ParticleStyle.Implosion)
     {
         CalculateVelocity(spawnRotation, maxVelocity);
     }
     else if (particleStyle == ParticleSystemSource.ParticleStyle.Rain)
     {
         velocity = new Vector2(0, maxVelocity);
     }
     this.rotationSpeed = rotationSpeed;
     this.particleStyle = particleStyle;
     position           = spawnPoint.ToVector2();
 }
 public void AddParticleSystem(ParticleSystemSource ps)
 {
     ps.identifier = particleSystemID;
     gameParticleSystems.Add(ps);
     particleSystemID++;
 }
Esempio n. 4
0
 static public void TurnOnWeather(int id)
 {
     bWeatherEffect = true;
     WeatherEffect  = GameProcessor.gcDB.gameParticleSystems.Find(ps => ps.identifier == id).Clone();
 }