예제 #1
0
        public GroundVehicle(int maxHealth, string textureName, string textureNameDestroyed, string type)
            : base(textureName, textureNameDestroyed)
        {
            _type = type;

            UsedInBoundingBoxCheck = true;
            alternating = true;

            Z = CalcHelper.RandomBetween(0.99801f, 0.9989f);

            _destroyed = false;
            _health = _maxHealth = maxHealth;

            if (SceneGraphManager.TypeMatch(this.GetType(), typeof(BossAntiAir)) || _type.Equals("burgerboss"))
            {
                _hpRectOutline = new Rectangle(9999, 9999, 200, 12);
                _healthMeterRect = new Rectangle(9999, 9999, 196, 10);
            }
            else
            {
                _hpRectOutline = new Rectangle(9999, 9999, 40, 5);
                _healthMeterRect = new Rectangle(9999, 9999, 38, 3);
            }

            _fireeeee = new ProjectileHit(EngineManager.Game, 7);
            _blackSmoke = new BlackSmoke(EngineManager.Game, 8);
            _groundDust = new GroundDust(EngineManager.Game, 4);

            EngineManager.Game.Components.Add(_groundDust);
            EngineManager.Game.Components.Add(_blackSmoke);
            EngineManager.Game.Components.Add(_fireeeee);
        }
예제 #2
0
파일: Airplane.cs 프로젝트: trew/PoorJetX
        public Airplane(int maxHealth, string textureName)
            : base(textureName, textureName + "_destroyed")
        {
            _thrust = 4;
            _lift = 0;
            _orientation = 90;
            _airSpeed = 4;
            _gravity = 3;
            _linearVelocity = 0;
            _velocityAngle = 90;
            _weight = 1;
            _fireeeee = new ProjectileHit(EngineManager.Game, 7);
            _blackSmoke = new BlackSmoke(EngineManager.Game, 8);
            _whiteSmoke = new WhiteSmoke(EngineManager.Game, 8);
            _groundDust = new GroundDust(EngineManager.Game, 5);

            EngineManager.Game.Components.Add(_whiteSmoke);
            EngineManager.Game.Components.Add(_blackSmoke);
            EngineManager.Game.Components.Add(_fireeeee);
            EngineManager.Game.Components.Add(_groundDust);

            Position = new Vector2(200, 500);
            Z = 0.997f;
            UsedInBoundingBoxCheck = true;
            IsDead = false;
            IsCrashing = false;
            _health = this._maxHealth = maxHealth;

            _hpRectOutline = new Rectangle(9999, 9999, 40, 5);
            _healthMeterRect = new Rectangle(9999, 9999, 38, 3);
            _smokeTimer = 1;
            _smokeTimerStartVal = 20;
        }
예제 #3
0
 public override void Initialize()
 {
     base.Initialize();
     _explosionParticles = new ExplosionParticleSystem(EngineManager.Game, 3);
     _groundExplosion = new GroundExplosion(EngineManager.Game, 8);
     _projectileHit = new ProjectileHit(EngineManager.Game, 5);
     _shrapnelExplosion = new ShrapnelExplosion(EngineManager.Game, 3);
     _blackSmoke = new BlackSmoke(EngineManager.Game, 3);
     _whiteSmoke = new WhiteSmoke(EngineManager.Game, 3);
     _groundDust = new GroundDust(EngineManager.Game, 3);
     _muzzleFlash = new MuzzleFlash(EngineManager.Game, 3);
     _fire = new Fire(EngineManager.Game, 3);
     _explosionParticles.Initialize();
     _groundExplosion.Initialize();
     _projectileHit.Initialize();
     _shrapnelExplosion.Initialize();
     _blackSmoke.Initialize();
     _whiteSmoke.Initialize();
     _groundDust.Initialize();
     _muzzleFlash.Initialize();
     _fire.Initialize();
 }