예제 #1
0
파일: Round.cs 프로젝트: kindohm/tanks
 protected virtual void projectile_Exploded(object sender, ProjectileExplodedEventArgs e)
 {
     this.projectileList.Remove(e.Projectile);
 }
예제 #2
0
파일: Vehicle.cs 프로젝트: kindohm/tanks
        void projectile_Exploded(object sender, ProjectileExplodedEventArgs e)
        {
            if (e.Target == null)
            {
                return;
            }

            if (e.Target is Vehicle & this.HitTarget != null)
            {
                this.HitTarget(this, new HitTargetEventArgs(this, e.Target as Vehicle));
            }
            else if (e.Target is Projectile & this.HitProjectile != null)
            {
                this.HitProjectile(this, new VehicleEventArgs(this));
            }
            else if (e.Target is Powerup & this.HitPowerup != null)
            {
                this.HitPowerup(this, new VehicleEventArgs(this));
            }
        }