Exemplo n.º 1
0
        public Tank(Vector2 position)
            : base(position)
        {
            Size = Settings.TankSize;
            ani = new Animation(new Rectangle(0, (int)(Size.Y * 2), (int)Size.X, (int)Size.Y), 10);
            ani.Delay = (int)(17 / Settings.TankSpeed) * 3;
            Direction = new Vector2(1, 0);
            TurretDirection = new Vector2(1, 0);
            TurretSourceRectangle = new Rectangle(0, (int)(Size.Y * 3), (int)Size.X, (int)Size.Y);

            BulletType = Projectile.Type.REGULAR;
            bulletTimer = 0;
            ReloadTime = Settings.BulletReloadTime;
            Color = Color.White;
            Speed = Settings.TankSpeed;
            ammo = 500;

            //Effects
            SmokePuffPuff = new ParticleEffect();
            SmokePuffPuff.Texture = Settings.TextureParticle;
            SmokePuffPuff.Color = Color.Black;
            SmokePuffPuff.Size = 20;
            SmokePuffPuff.NumberOfParticles = 15;
            SmokePuffPuff.SpeedGenerator = new Vector2(.1f,.5f);
            BurnBabyBurn = new ParticleEffect();
            BurnBabyBurn.Texture = Settings.TextureParticle;
            BurnBabyBurn.Color = Color.OrangeRed;
            BurnBabyBurn.Size = SmokePuffPuff.Size*.5f;
            BurnBabyBurn.NumberOfParticles = 5;
            BurnBabyBurn.SpeedGenerator = SmokePuffPuff.SpeedGenerator*.5f;
        }
Exemplo n.º 2
0
 public TanksGame(Controller controller)
 {
     //Initialize
     gameState = GameState.PLAYING;
     LoadContent();
     particleEngine = new ParticleEffect();
     this.controller = controller;
     player1.PlayerID = controller.PlayerID;
 }
Exemplo n.º 3
0
        public GrenadeMissile(Vector2 Position, Vector2 Direction)
            : base(Position, Direction)
        {
            SourceRectangle = new Rectangle((int)(Size.Y * (int)1), (int)(Size.Y * 4), (int)Size.X, (int)Size.Y);
            Damage *= 1.5f;
            Speed *= 1.5f;

            smokeTrail = new ParticleEffect();
            smokeTrail.Texture = Settings.TextureParticle;
            smokeTrail.Size = 5;
            smokeTrail.NumberOfParticles = 3;
            smokeTrail.SpeedGenerator = new Vector2(0.1f, 0.2f);
        }
Exemplo n.º 4
0
 public TanksGame()
 {
     gameState = GameState.PLAYING;
     LoadContent();
     particleEngine = new ParticleEffect();
 }