コード例 #1
0
ファイル: ParticleMapEffect.cs プロジェクト: jpx/blazera
        void Init()
        {
            Effect = new ParticleEffect();

            Effect.OnEnding += new ParticleEffect.ParticleEffectEventHandler(Effect_OnEnding);

            Effect.Texture = Create.Texture("blurredbar");

            Effect.Position = Position;

            Effect.ParticleCount = 150;
            Effect.GenerationPeriod = .1D;
            Effect.GenerationCount = 20;

            Effect.Gravity = 0F;
            Effect.Mass = new Vector2f(10, 10);
            Effect.MinPosition = new Vector2f(-15F, -4F);
            Effect.MaxPosition = new Vector2f(15F, 4F);
            Effect.MinColor = Color.Green;
            Effect.MaxColor = Color.Green;
            Effect.Acceleration = new Vector2f(0f, 5f);
            Effect.AlphaLimit = new Vector2f(0.55f, .8f);
            Effect.Angle = new Vector2f(270f, 270f);
            Effect.DurationTime = new Vector2f(.5f, 1.2f);
            Effect.Rotation = new Vector2f(0, 0);
            Effect.MinScale = new Vector2f(.003f, .003f);
            Effect.MaxScale = new Vector2f(.02f, .02f);
            const float SV = .1F;
            Effect.MinScaleVariation = new Vector2f(SV, SV);
            Effect.MaxScaleVariation = new Vector2f(SV, SV);
            Effect.Velocity = new Vector2f(10F, 70F);

            Effect.Init();
        }
コード例 #2
0
ファイル: MainTitleScreen.cs プロジェクト: eickegao/Blazera
        private ParticleEffect InitParticle()
        {
            ParticleEffect pe = new ParticleEffect();
            pe.Texture = Create.Texture("Particle_drop");
            pe.Acceleration = new Vector2f(-60f, -60f);
            pe.AlphaLimit = new Vector2f(0.5f, 0.5f);
            pe.Angle = new Vector2f(0f, 360f);
            pe.MinColor = Color.Black;
            pe.MaxColor = Color.White;
            pe.DurationTime = new Vector2f(1f, 1.5f);
            pe.Position = new Vector2f(RandomHelper.Get(0F, Gui.Dimension.X), RandomHelper.Get(0F, Gui.Dimension.Y));
            pe.Rotation = new Vector2f(0, 0);
            pe.MinScale = new Vector2f(.03f, .03f);
            pe.MaxScale = new Vector2f(.03f, .03f);
            pe.Velocity = new Vector2f(10, 200);

            pe.Init();
            return pe;
        }