Пример #1
0
 public override void CleanUp()
 {
     base.CleanUp();
     particleEngine = null;
     InputController.Unbind("moveX", HandleHorizontalMovement);
     InputController.Unbind("moveY", HandleVerticalMovement);
     InputController.Unbind("changePolarity", HandleChangePolarity);
     InputController.Unbind("shoot", HandleShot);
 }
Пример #2
0
 public override void Initialize(Texture2D texture, Vector2 position)
 {
     base.Initialize(texture, position);
     BoxDimensions.X = 10;
     BoxDimensions.Y = 10;
     BoxDimensions.W = 10;
     BoxDimensions.Z = 10;
     MaxVelocity = 8;
     InitBox();
     particleEngine = ParticleEffectFactory.CreateBullet(position);
 }
Пример #3
0
        public static ParticleEngine CreatePolarCircle(Vector2 location)
        {
            List<Texture2D> texturesList = new List<Texture2D>();

            //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
            texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
            texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));

            ParticleEngine particleEngine = new ParticleEngine(texturesList, location);

            particleEngine.Color = new Color(239, 203, 204);
            particleEngine.TTL = 10;
            particleEngine.TTLRandomFactor = 5;
            particleEngine.ScatterFactor = 40;
            particleEngine.ParticleCount = 50;
            particleEngine.StretchFactor = 2.8f;

            return particleEngine;
        }
Пример #4
0
        public static ParticleEngine CreateBullet(Vector2 location)
        {
            List<Texture2D> texturesList = new List<Texture2D>();

            texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
            //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
            texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));

            ParticleEngine particleEngine = new ParticleEngine(texturesList, location);

            particleEngine.Color = Color.Gray;
            particleEngine.TTL = 5;
            particleEngine.TTLRandomFactor = 5;
            particleEngine.ScatterFactor = 5;
            particleEngine.ParticleCount = 10;
            particleEngine.StretchFactor = 1;

            return particleEngine;
        }
Пример #5
0
 public override void CleanUp()
 {
     base.CleanUp();
     this.particleEngine = null;
 }
Пример #6
0
 void InitParticleEngine()
 {
     particleEngine = ParticleEffectFactory.CreatePolarCircle(Position);
 }