Beispiel #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="Sprite">The sprite for the gun.</param>
        /// <param name="Projectile">The projectile the gun uses.</param>
        /// <param name="MaxAmmo">The max ammo this gun has.</param>
        /// <param name="FiringRate">The delay between this gun can fire.</param>
        /// <param name="ReloadSpeed">The rate at which the gun reloads.</param>
        /// <param name="ConsumesXAmmo">How many bullets per shot the gun consumes.</param>
        public SSCGun(AnimatedSprite Sprite, SSCProjectile Projectile, int MaxAmmo, double FiringRate, double ReloadSpeed, int ConsumesXAmmo = 1)
        {
            this.sprite      = Sprite;
            this._projectile = Projectile;

            this.maxAmmo                  = MaxAmmo;
            this.remainingAmmo            = this.maxAmmo;
            this.firingDelay              = FiringRate;
            this.reloadSpeed              = ReloadSpeed;
            this.timeRemainingUntilReload = this.reloadSpeed;
            this.consumesXAmmoPerShot     = ConsumesXAmmo;
        }
 /// <summary>
 /// What happens when the target collides with a projectile.
 /// </summary>
 /// <param name="other"></param>
 public override void onCollision(SSCProjectile other)
 {
     if (this.targetHit)
     {
         return;
     }
     if (other is SSCProjectiles.SSCProjectile)
     {
         this.CurrentHealth -= other.damage;
         this.die();
         if (SeasideScramble.self.currentMap is ShootingGallery)
         {
             (SeasideScramble.self.currentMap as ShootingGallery).addScore((other.owner as SSCPlayer).playerID, 1);
         }
     }
 }
 public SSCGun_HeatWave(AnimatedSprite Sprite, SSCProjectile Projectile, int MaxAmmo, double FiringRate, double ReloadSpeed, int ConsumesXAmmo = 1) : base(Sprite, Projectile, MaxAmmo, FiringRate, ReloadSpeed, ConsumesXAmmo)
 {
 }