예제 #1
0
 public override void CollisionEffects(Vessel player)
 {
     switch (powerType)
     {
         //extra health
         case 1: player.currentEnergy += 250;
                 break;
         //extra shield
         case 2: player.energySaver += 250;
                 break;
         //kill health
         case 3: player.currentEnergy -= 100;
                 break;
         //kill shield
         case 4: player.energySaver -= 100;
                 break;
         //add bullet
         case 5: player.ChangeWeapon(0, 16, 8, 1);
                 break;
         //add missiles
         case 6: player.ChangeWeapon(1, 6, 10, 2);
                 break;
         //add sliceshot
         case 7: player.ChangeWeapon(0, 5, 15, 3);
                 break;
         //add laser
         case 8: player.ChangeWeapon(1, 6, 2, 4);
                 break;
         //extra health
         default: player.currentEnergy += 250;
                 if (player.currentEnergy > player.initialEnergy)
                     player.currentEnergy = player.initialEnergy;
                 break;
     }
 }
예제 #2
0
 public Missile(int projectileNumber, Weapon firingWeapon, Vessel origin, float gravity, float _deceleration, Vector2 _accelerationLimits, bool _destroyable, bool _collidable, int _power, int energy, int timer, int points, Texture2D textureSheet, float width, float height, int spriteLine, float frameRate, int _frameCount, bool isLooping)
     : base(firingWeapon, origin, gravity, _deceleration, _accelerationLimits, _destroyable, _collidable, _power, energy, timer, points, textureSheet, width, height, spriteLine, frameRate, _frameCount, isLooping)
 {
     rotateway = -90.0f;
     if (Helper.OddEvenChoice(projectileNumber) == 1 && projectileNumber>0)
         rotateway = 90.0f;
     rotation = origin.rotation;
     SetTrajectory(rotation);
 }
예제 #3
0
 public Weapon(Texture2D projectileTextures, int _maxProjectiles, int _fireRate, int _ammoType, Vessel origin)
 {
     maxProjectiles = _maxProjectiles;
     fireRate = _fireRate;
     originator = origin;
     ammoType = _ammoType;
     fireTimer = 0;
     textureSheet = projectileTextures;
     GenerateProjectiles();
 }
예제 #4
0
 public Projectile(Weapon _firingWeapon, Vessel origin, float weight, float _deceleration, Vector2 _accelerationLimits, bool _destroyable, bool _collidable, int _power, int energy, int timer, int points, Texture2D textureSheet, float width, float height, int spriteLine, float frameRate, int _frameCount, bool isLooping)
     : base(weight, _deceleration, _accelerationLimits, _destroyable, _collidable, _power, energy, timer, points, textureSheet, width, height, spriteLine, frameRate, _frameCount, isLooping)
 {
     firingWeapon = _firingWeapon;
     originiator = origin;
     position = origin.position;
     safePosition = position;
     collided = false;
     lastSideCollided = -1;
     totalLife = 0;
 }
예제 #5
0
 public virtual void CollisionEffects(Vessel player)
 {
 }