Skip to content

Commit 4befadd

Browse files
committed
feat: welding sfx
1 parent e809f6f commit 4befadd

File tree

3 files changed

+135
-23
lines changed

3 files changed

+135
-23
lines changed

Assets/Scenes/Reparation.unity

+130-19
Original file line numberDiff line numberDiff line change
@@ -4406,8 +4406,8 @@ BoxCollider:
44064406
m_ProvidesContacts: 0
44074407
m_Enabled: 1
44084408
serializedVersion: 3
4409-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
4410-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
4409+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.8605865}
4410+
m_Center: {x: -0.2701645, y: -0.00066639035, z: 0.43029377}
44114411
--- !u!1001 &369753995
44124412
PrefabInstance:
44134413
m_ObjectHideFlags: 0
@@ -4512,8 +4512,8 @@ BoxCollider:
45124512
m_ProvidesContacts: 0
45134513
m_Enabled: 1
45144514
serializedVersion: 3
4515-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
4516-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
4515+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.8974137}
4516+
m_Center: {x: -0.2701645, y: -0.00066637, z: 0.17916782}
45174517
--- !u!1001 &371798156
45184518
PrefabInstance:
45194519
m_ObjectHideFlags: 0
@@ -6910,8 +6910,8 @@ BoxCollider:
69106910
m_ProvidesContacts: 0
69116911
m_Enabled: 1
69126912
serializedVersion: 3
6913-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
6914-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
6913+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.7568693}
6914+
m_Center: {x: -0.2701645, y: -0.00066638173, z: 0.37843528}
69156915
--- !u!1001 &519901841
69166916
PrefabInstance:
69176917
m_ObjectHideFlags: 0
@@ -8242,8 +8242,8 @@ BoxCollider:
82428242
m_ProvidesContacts: 0
82438243
m_Enabled: 1
82448244
serializedVersion: 3
8245-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
8246-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
8245+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.928113}
8246+
m_Center: {x: -0.2701645, y: -0.0006663784, z: 0.4640572}
82478247
--- !u!1001 &605735550
82488248
PrefabInstance:
82498249
m_ObjectHideFlags: 0
@@ -11748,7 +11748,7 @@ PrefabInstance:
1174811748
objectReference: {fileID: 0}
1174911749
- target: {fileID: 1285577524151521393, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
1175011750
propertyPath: verticalSwimSpeed
11751-
value: 0.5
11751+
value: 2.25
1175211752
objectReference: {fileID: 0}
1175311753
- target: {fileID: 1285577524151521393, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
1175411754
propertyPath: underwaterAmbience
@@ -11854,6 +11854,18 @@ PrefabInstance:
1185411854
propertyPath: m_Name
1185511855
value: FirstPersonController
1185611856
objectReference: {fileID: 0}
11857+
- target: {fileID: 4614605577419265582, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
11858+
propertyPath: fixSound
11859+
value:
11860+
objectReference: {fileID: 8300000, guid: 943919089a11d73468a581b3d1940529, type: 3}
11861+
- target: {fileID: 4614605577419265582, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
11862+
propertyPath: audioSource
11863+
value:
11864+
objectReference: {fileID: 1128651442}
11865+
- target: {fileID: 4614605577419265582, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
11866+
propertyPath: weldingSound
11867+
value:
11868+
objectReference: {fileID: 8300000, guid: 943919089a11d73468a581b3d1940529, type: 3}
1185711869
m_RemovedComponents: []
1185811870
m_RemovedGameObjects: []
1185911871
m_AddedGameObjects: []
@@ -11864,6 +11876,9 @@ PrefabInstance:
1186411876
- targetCorrespondingSourceObject: {fileID: 4459864850019384750, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
1186511877
insertIndex: -1
1186611878
addedObject: {fileID: 1128651433}
11879+
- targetCorrespondingSourceObject: {fileID: 4459864850019384750, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
11880+
insertIndex: -1
11881+
addedObject: {fileID: 1128651442}
1186711882
- targetCorrespondingSourceObject: {fileID: 4459864851310106424, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
1186811883
insertIndex: -1
1186911884
addedObject: {fileID: 848670200}
@@ -13448,8 +13463,8 @@ BoxCollider:
1344813463
m_ProvidesContacts: 0
1344913464
m_Enabled: 1
1345013465
serializedVersion: 3
13451-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
13452-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
13466+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.7981886}
13467+
m_Center: {x: -0.2701645, y: -0.0006663806, z: 0.18191157}
1345313468
--- !u!4 &950961735 stripped
1345413469
Transform:
1345513470
m_CorrespondingSourceObject: {fileID: -5819118886272102141, guid: 454dd80ab25e2bf42be2cf0f77ffdbc1, type: 3}
@@ -15443,8 +15458,8 @@ BoxCollider:
1544315458
m_ProvidesContacts: 0
1544415459
m_Enabled: 1
1544515460
serializedVersion: 3
15446-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
15447-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
15461+
m_Size: {x: 3.2790012, y: 2.736741, z: 2.5839596}
15462+
m_Center: {x: -0.2701645, y: -0.0006663798, z: -0.01088655}
1544815463
--- !u!4 &1082649856 stripped
1544915464
Transform:
1545015465
m_CorrespondingSourceObject: {fileID: -5819118886272102141, guid: 341d91572473bd8468537968a6f8bb19, type: 3}
@@ -16181,8 +16196,8 @@ BoxCollider:
1618116196
m_ProvidesContacts: 0
1618216197
m_Enabled: 1
1618316198
serializedVersion: 3
16184-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
16185-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
16199+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.8205787}
16200+
m_Center: {x: -0.2701645, y: -0.0006663837, z: 0.4102897}
1618616201
--- !u!4 &1125151924 stripped
1618716202
Transform:
1618816203
m_CorrespondingSourceObject: {fileID: -5819118886272102141, guid: 89ba301c06f6bd245bf895b49f3e46d6, type: 3}
@@ -16397,6 +16412,102 @@ AudioSource:
1639716412
m_PostInfinity: 2
1639816413
m_RotationOrder: 4
1639916414
--- !u!82 &1128651433
16415+
AudioSource:
16416+
m_ObjectHideFlags: 0
16417+
m_CorrespondingSourceObject: {fileID: 0}
16418+
m_PrefabInstance: {fileID: 0}
16419+
m_PrefabAsset: {fileID: 0}
16420+
m_GameObject: {fileID: 635657467}
16421+
m_Enabled: 1
16422+
serializedVersion: 4
16423+
OutputAudioMixerGroup: {fileID: 0}
16424+
m_audioClip: {fileID: 0}
16425+
m_PlayOnAwake: 1
16426+
m_Volume: 1
16427+
m_Pitch: 1
16428+
Loop: 0
16429+
Mute: 0
16430+
Spatialize: 0
16431+
SpatializePostEffects: 0
16432+
Priority: 128
16433+
DopplerLevel: 1
16434+
MinDistance: 1
16435+
MaxDistance: 500
16436+
Pan2D: 0
16437+
rolloffMode: 0
16438+
BypassEffects: 0
16439+
BypassListenerEffects: 0
16440+
BypassReverbZones: 0
16441+
rolloffCustomCurve:
16442+
serializedVersion: 2
16443+
m_Curve:
16444+
- serializedVersion: 3
16445+
time: 0
16446+
value: 1
16447+
inSlope: 0
16448+
outSlope: 0
16449+
tangentMode: 0
16450+
weightedMode: 0
16451+
inWeight: 0.33333334
16452+
outWeight: 0.33333334
16453+
- serializedVersion: 3
16454+
time: 1
16455+
value: 0
16456+
inSlope: 0
16457+
outSlope: 0
16458+
tangentMode: 0
16459+
weightedMode: 0
16460+
inWeight: 0.33333334
16461+
outWeight: 0.33333334
16462+
m_PreInfinity: 2
16463+
m_PostInfinity: 2
16464+
m_RotationOrder: 4
16465+
panLevelCustomCurve:
16466+
serializedVersion: 2
16467+
m_Curve:
16468+
- serializedVersion: 3
16469+
time: 0
16470+
value: 0
16471+
inSlope: 0
16472+
outSlope: 0
16473+
tangentMode: 0
16474+
weightedMode: 0
16475+
inWeight: 0.33333334
16476+
outWeight: 0.33333334
16477+
m_PreInfinity: 2
16478+
m_PostInfinity: 2
16479+
m_RotationOrder: 4
16480+
spreadCustomCurve:
16481+
serializedVersion: 2
16482+
m_Curve:
16483+
- serializedVersion: 3
16484+
time: 0
16485+
value: 0
16486+
inSlope: 0
16487+
outSlope: 0
16488+
tangentMode: 0
16489+
weightedMode: 0
16490+
inWeight: 0.33333334
16491+
outWeight: 0.33333334
16492+
m_PreInfinity: 2
16493+
m_PostInfinity: 2
16494+
m_RotationOrder: 4
16495+
reverbZoneMixCustomCurve:
16496+
serializedVersion: 2
16497+
m_Curve:
16498+
- serializedVersion: 3
16499+
time: 0
16500+
value: 1
16501+
inSlope: 0
16502+
outSlope: 0
16503+
tangentMode: 0
16504+
weightedMode: 0
16505+
inWeight: 0.33333334
16506+
outWeight: 0.33333334
16507+
m_PreInfinity: 2
16508+
m_PostInfinity: 2
16509+
m_RotationOrder: 4
16510+
--- !u!82 &1128651442
1640016511
AudioSource:
1640116512
m_ObjectHideFlags: 0
1640216513
m_CorrespondingSourceObject: {fileID: 0}
@@ -18538,8 +18649,8 @@ BoxCollider:
1853818649
m_ProvidesContacts: 0
1853918650
m_Enabled: 1
1854018651
serializedVersion: 3
18541-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
18542-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
18652+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.868679}
18653+
m_Center: {x: -0.27016452, y: -0.0006663977, z: 0.43433806}
1854318654
--- !u!4 &1280314460 stripped
1854418655
Transform:
1854518656
m_CorrespondingSourceObject: {fileID: -5819118886272102141, guid: 028026035a9b47641967d77575f196a8, type: 3}
@@ -22092,8 +22203,8 @@ BoxCollider:
2209222203
m_ProvidesContacts: 0
2209322204
m_Enabled: 1
2209422205
serializedVersion: 3
22095-
m_Size: {x: 3.2790012, y: 2.736741, z: 1}
22096-
m_Center: {x: -0.2701645, y: -0.0006663799, z: 2.530936e-18}
22206+
m_Size: {x: 3.2790012, y: 2.736741, z: 1.9373385}
22207+
m_Center: {x: -0.2701645, y: -0.0006663806, z: 0.46866995}
2209722208
--- !u!1001 &1503352947
2209822209
PrefabInstance:
2209922210
m_ObjectHideFlags: 0

Assets/Scripts/FixLogic.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
public class FixLogic : MonoBehaviour
55
{
66
public int fixedCount;
7+
public AudioSource audioSource;
8+
public AudioClip weldingSound;
79
private bool _isOverlapping;
810
private GameObject _currentLeak;
911
private bool _isFixing;
@@ -26,10 +28,9 @@ private void OnTriggerExit(Collider other)
2628

2729
private void Update()
2830
{
29-
if (_isOverlapping && Input.GetKey(KeyCode.F) && !_isFixing)
30-
{
31-
StartCoroutine(FixLeak());
32-
}
31+
if (!_isOverlapping || !Input.GetKey(KeyCode.F) || _isFixing) return;
32+
StartCoroutine(FixLeak());
33+
audioSource.PlayOneShot(weldingSound);
3334
}
3435

3536
private IEnumerator FixLeak()
-129 KB
Binary file not shown.

0 commit comments

Comments
 (0)