mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: that's a lotta damage easter egg
This commit is contained in:
1 parent
b1c3453d38
commit
4f7b4f1602
2 files changed
+11
-1
No files matched your search
Binary file not shown.
@@ -43,7 +43,7 @@ export function ShotDisplay() {
|
||||
let animationStartTime: number | null = null;
|
||||
|
||||
useEffect(() => {
|
||||
if (shot && shot.splashRadius !== undefined) {
|
||||
if (shot?.splashRadius !== undefined) {
|
||||
const outlineGeometry = new BufferGeometry().setFromPoints(
|
||||
new Path().absarc(0, 0, 1, 0, Math.PI * 2).getSpacedPoints(50),
|
||||
);
|
||||
@@ -65,6 +65,16 @@ export function ShotDisplay() {
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (shot?.splashRadius !== undefined && shot.in.status === 'penetration') {
|
||||
const audio = new Audio('/assets/audio/lotta-damage.mp3');
|
||||
|
||||
audio.currentTime = 0.7;
|
||||
audio.volume = 0.25;
|
||||
audio.play();
|
||||
}
|
||||
}, [shot]);
|
||||
|
||||
useFrame(({ clock }) => {
|
||||
if (!shot) return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user