diff --git a/res/sounds/shot_fired1.wav b/res/sounds/shot_fired1.wav new file mode 100644 index 0000000..ea387d3 Binary files /dev/null and b/res/sounds/shot_fired1.wav differ diff --git a/res/sounds/shot_fired2.wav b/res/sounds/shot_fired2.wav new file mode 100644 index 0000000..ea387d3 Binary files /dev/null and b/res/sounds/shot_fired2.wav differ diff --git a/src/de/teamteamteam/spacescooter/entity/Player.java b/src/de/teamteamteam/spacescooter/entity/Player.java index d7290bf..2c16ba0 100644 --- a/src/de/teamteamteam/spacescooter/entity/Player.java +++ b/src/de/teamteamteam/spacescooter/entity/Player.java @@ -75,6 +75,12 @@ public class Player extends ShootingEntity implements KeyboardListener { SoundSystem.playSound("sounds/abgang.wav"); } + @Override + public void createShot() { + super.createShot(); + SoundSystem.playSound("sounds/shot_fired1.wav"); + } + /** * On cleanup, unregister from the keyboard. */ diff --git a/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java b/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java index da1b10b..2db136c 100644 --- a/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java +++ b/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java @@ -166,7 +166,7 @@ public abstract class ShootingEntity extends LivingEntity { /** * Internal method to actually spawn the fired Shots. */ - private void createShot() { + public void createShot() { new Shot( this.getX() + this.shootSpawnX, this.getY() + this.shootSpawnY, diff --git a/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java b/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java index b5ef190..92bb482 100644 --- a/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java +++ b/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java @@ -2,6 +2,7 @@ package de.teamteamteam.spacescooter.entity.enemy; import de.teamteamteam.spacescooter.entity.ShootingEntity; import de.teamteamteam.spacescooter.entity.shot.Shot; +import de.teamteamteam.spacescooter.sound.SoundSystem; import de.teamteamteam.spacescooter.utility.Random; public abstract class Enemy extends ShootingEntity { @@ -22,6 +23,12 @@ public abstract class Enemy extends ShootingEntity { if(willShoot == true) this.shoot(); } + + @Override + public void createShot() { + super.createShot(); + SoundSystem.playSound("sounds/shot_fired2.wav"); + } }