Skip to content

Commit

Permalink
ZS-94 Steampunk SFX (#41)
Browse files Browse the repository at this point in the history
* Sound Manager and Basics Added

* ZS-95 Bakround Music Added and Playing

* ZS-96 Shooting SFX Added

* ZS-97 Death SFX Added

* ZS-98 Landing SFX Added

* ZS-99 Dink SFX Added

* ZS-100 Bullet Hit SFX Added

* ZS-101 Added Player Hit SFX
  • Loading branch information
Richard-Fleming authored Mar 7, 2022
1 parent a3e0751 commit 865f13e
Show file tree
Hide file tree
Showing 22 changed files with 404 additions and 4 deletions.
8 changes: 8 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added RWM-P2-TEAM-C/Assets/Resources/SFX/bgm.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX/bgm.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added RWM-P2-TEAM-C/Assets/Resources/SFX/bhit.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX/bhit.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added RWM-P2-TEAM-C/Assets/Resources/SFX/buster.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX/buster.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added RWM-P2-TEAM-C/Assets/Resources/SFX/death.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX/death.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added RWM-P2-TEAM-C/Assets/Resources/SFX/dink.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX/dink.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added RWM-P2-TEAM-C/Assets/Resources/SFX/land.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX/land.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added RWM-P2-TEAM-C/Assets/Resources/SFX/phit.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions RWM-P2-TEAM-C/Assets/Resources/SFX/phit.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 140 additions & 0 deletions RWM-P2-TEAM-C/Assets/Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -2836,6 +2836,146 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1976943761}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1897102209
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1897102212}
- component: {fileID: 1897102213}
- component: {fileID: 1897102210}
m_Layer: 0
m_Name: SoundManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1897102210
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1897102209}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c9728d0b922ee104a882266b4fec8778, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1897102212
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1897102209}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &1897102213
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1897102209}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1001 &1976943761
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
9 changes: 5 additions & 4 deletions RWM-P2-TEAM-C/Assets/Scripts/Bullet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ void OnTriggerEnter2D(Collider2D t_other)
{
if (t_other.tag != "Player")
{
if (t_other.gameObject.tag == "Bomb") { Destroy(t_other.gameObject); }
else if (t_other.gameObject.tag == "Shrapnel") { Destroy(t_other.gameObject); }
else if (t_other.gameObject.tag == "Bomber") { t_other.gameObject.GetComponent<Bomber>().Damage(1); }
else if (t_other.gameObject.tag == "Follower") { t_other.gameObject.GetComponent<FlyingFollower>().damage(1); }
if (t_other.gameObject.tag == "Bomb") { Destroy(t_other.gameObject); SoundManagerScript.PlaySound("bhit"); }
else if (t_other.gameObject.tag == "Shrapnel") { Destroy(t_other.gameObject); SoundManagerScript.PlaySound("bhit"); }
else if (t_other.gameObject.tag == "Bomber") { t_other.gameObject.GetComponent<Bomber>().Damage(1); SoundManagerScript.PlaySound("bhit"); }
else if (t_other.gameObject.tag == "Follower" && !t_other.gameObject.GetComponent<FlyingFollower>().invincible) { t_other.gameObject.GetComponent<FlyingFollower>().damage(1); SoundManagerScript.PlaySound("bhit"); }
else if (t_other.gameObject.tag == "Follower" && t_other.gameObject.GetComponent<FlyingFollower>().invincible) { SoundManagerScript.PlaySound("dink"); }
bulletManager.decreaseBullets(); // decrease total number of bullets
StopCoroutine("livingTime"); // stop the co-routine before destroying
Destroy(gameObject);
Expand Down
1 change: 1 addition & 0 deletions RWM-P2-TEAM-C/Assets/Scripts/BulletManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void shootBullet()
bulletPrefab.GetComponent<Bullet>().speed = bulletMoveSpeed;
bulletPrefab.GetComponent<Bullet>().lifetime = bulletLifeTime;

SoundManagerScript.PlaySound("buster");
AnalyticsManager.instance.data.bulletsFired++;
}
}
Expand Down
9 changes: 9 additions & 0 deletions RWM-P2-TEAM-C/Assets/Scripts/PlayerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public void decreseHealth(int healthReduction)
{
if (!_invincible)
{
SoundManagerScript.PlaySound("phit");
if (_health - healthReduction <= 0)
{
_health = 0;
Expand Down Expand Up @@ -262,7 +263,15 @@ public void setUpDeadAnimation()
gameObject.GetComponent<Runtime2DMovement>().enabled = false;
gameObject.GetComponent<BulletManager>().enabled = false;
gameObject.GetComponent<Rigidbody2D>().gravityScale = 0.0f;
SoundManagerScript.PlaySound("death");
this.enabled = false;
}
}
private void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.tag == "Ground" && !_animator.GetBool("grounded"))
{
SoundManagerScript.PlaySound("land");
}
}
}
Loading

0 comments on commit 865f13e

Please sign in to comment.