Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/beardgame/td into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcscharf committed Nov 27, 2023
2 parents d98710a + 7c36122 commit f8036b5
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Bearded.TD.Game.Simulation.Elements.events;
using Bearded.TD.Game.Simulation.GameObjects;
using Bearded.TD.Game.Simulation.Weapons;
using Bearded.TD.Shared.Events;
Expand Down Expand Up @@ -26,5 +27,6 @@ public override void Update(TimeSpan elapsedTime) { }
public void HandleEvent(FireWeapon e)
{
EmitArc(e.Damage, range.GetTilesInRange());
Events.Send(new EmittedArc());
}
}
6 changes: 6 additions & 0 deletions src/Bearded.TD/Game/Simulation/Elements/events/EmittedArc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using Bearded.TD.Game.Simulation.GameObjects;

namespace Bearded.TD.Game.Simulation.Elements.events;

[Trigger("emittedArc")]
readonly record struct EmittedArc : IComponentEvent;
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

namespace Bearded.TD.Game.Simulation.Physics;

[Trigger("collidedWithLevel")]
readonly record struct CollideWithLevel(Impact Info, Tile Tile) : IComponentEvent;
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
{
id: "playSoundOnTrigger",
parameters: {
trigger: "shotProjectile",
sound: "bang-deep",
trigger: "collidedWithLevel",
sound: "hit-metal",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@
}
},
{
id: "loopSoundWhileShooting",
parameters: { sound: "tesla-loop" },
id: "playSoundOnTrigger",
parameters: {
trigger: "emittedArc",
sound: "hit-electricity",
},
}
]
}
4 changes: 4 additions & 0 deletions src/Bearded.TD/assets/mods/default/sfx/attribution.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shots/hit-electricity
- uses sample by newlocknew - https://creativecommons.org/licenses/by/4.0/
shots/hit-metal
- sample by newlocknew, mixed to mono and shortened - https://creativecommons.org/licenses/by/4.0/
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
id: "hit-electricity",
pitchRange: [0.9, 1.1],
}
Binary file not shown.
5 changes: 5 additions & 0 deletions src/Bearded.TD/assets/mods/default/sfx/shots/hit-metal.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
id: "hit-metal",
gain: 0.7,
pitchRange: [0.95, 1.05],
}
Binary file not shown.

0 comments on commit f8036b5

Please sign in to comment.