예제 #1
0
파일: Explosion.cs 프로젝트: Dahrkael/CoRe
        protected override Particle GenerateParticle()
        {
            float rndX = (float)random.NextDouble() * random.Next(-5, 5);
            float rndY = (float)random.NextDouble() * random.Next(-5, 5);

            Particle particle = new Particle(this, image, position, new Vector2(rndX, -rndY), random.Next(DefaultParticlesLife));
            particle.Color = color;
            particle.Zoom = 0.3f;
            return particle;
        }
예제 #2
0
파일: Firework.cs 프로젝트: Dahrkael/CoRe
        private void CreateRocket()
        {
            float rndX = (float)random.NextDouble() * random.Next(-5, 5);
            float rndY = 8;//(float)(Random.NextDouble() + 2.0f) * 4;

            Particle particle = new Particle(this, image, position, new Vector2(rndX, -rndY), 0);
            particle.Color = color;
            particle.Zoom = 0.2f;
            particles.Add(particle);
        }
예제 #3
0
파일: Firework.cs 프로젝트: Dahrkael/CoRe
        protected override Particle GenerateParticle()
        {
            float rndX = (float)random.NextDouble() * random.Next(-5, 5);
            float rndY = (float)random.NextDouble() * random.Next(-5, 5);

            //Vector2 circle = new Vector2((float)Math.Cos(Math.PI * 2 * iParticles.Count / DefaultParticlesNumber),
            //           ((float)Math.Sin(Math.PI * 2 * iParticles.Count / DefaultParticlesNumber)/2)-0.75f);

            Particle particle = new Particle(this, image, position, new Vector2(rndX, -rndY), random.Next(DefaultParticlesLife));
            particle.Color = color;
            particle.Zoom = 0.4f;
            return particle;
        }
예제 #4
0
파일: Fountain.cs 프로젝트: Dahrkael/CoRe
 protected void ResetParticle(Particle particle)
 {
     particle.Position = position;
     particle.Velocity = velocity();
     particle.Life = random.Next(DefaultParticlesLife);
 }
예제 #5
0
파일: Fountain.cs 프로젝트: Dahrkael/CoRe
 protected override Particle GenerateParticle()
 {
     Particle particle = new Particle(this, image, position, velocity(), random.Next(DefaultParticlesLife));
     particle.Color = color;
     particle.Zoom = 0.5f;
     return particle;
 }