Skip to content

Commit b172dfc

Browse files
author
Daniel Garcia Fernandez
committed
[SFX] Added dock feedback sfx
1 parent a581911 commit b172dfc

File tree

7 files changed

+131
-21
lines changed

7 files changed

+131
-21
lines changed

CleanSailingGame_Unity/Assets/0_MyAssets/Prefabs/Environment/Dock.prefab

Lines changed: 107 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ GameObject:
1818
m_Icon: {fileID: 0}
1919
m_NavMeshLayer: 0
2020
m_StaticEditorFlags: 0
21-
m_IsActive: 1
21+
m_IsActive: 0
2222
--- !u!224 &30583752
2323
RectTransform:
2424
m_ObjectHideFlags: 0
@@ -28,7 +28,7 @@ RectTransform:
2828
m_GameObject: {fileID: 30583751}
2929
m_LocalRotation: {x: 0.010684878, y: -0.70703316, z: -0.7070153, w: 0.010931045}
3030
m_LocalPosition: {x: 0, y: 0, z: 1.2230002}
31-
m_LocalScale: {x: 0.09684294, y: 0.08382815, z: 0.11228365}
31+
m_LocalScale: {x: 0.058541555, y: 0.050674118, z: 0.06787547}
3232
m_Children:
3333
- {fileID: 286425398}
3434
m_Father: {fileID: 4612589583435618206}
@@ -134,7 +134,7 @@ RectTransform:
134134
m_AnchorMin: {x: 0.5, y: 0.5}
135135
m_AnchorMax: {x: 0.5, y: 0.5}
136136
m_AnchoredPosition: {x: -0.000013828, y: -0}
137-
m_SizeDelta: {x: 5.6721, y: 10}
137+
m_SizeDelta: {x: 30, y: 10}
138138
m_Pivot: {x: 0.5, y: 0.5}
139139
--- !u!222 &286425400
140140
CanvasRenderer:
@@ -162,7 +162,7 @@ MonoBehaviour:
162162
m_OnCullStateChanged:
163163
m_PersistentCalls:
164164
m_Calls: []
165-
m_text: E
165+
m_text: Press E
166166
m_isRightToLeft: 0
167167
m_fontAsset: {fileID: 11400000, guid: 4c053bb4a3e8e4543bdad2b8b83608f1, type: 2}
168168
m_sharedMaterial: {fileID: -7135502178318230594, guid: 4c053bb4a3e8e4543bdad2b8b83608f1,
@@ -191,8 +191,8 @@ MonoBehaviour:
191191
m_outlineColor:
192192
serializedVersion: 2
193193
rgba: 4278190080
194-
m_fontSize: 10
195-
m_fontSizeBase: 10
194+
m_fontSize: 4
195+
m_fontSizeBase: 4
196196
m_fontWeight: 400
197197
m_enableAutoSizing: 0
198198
m_fontSizeMin: 18
@@ -232,10 +232,10 @@ MonoBehaviour:
232232
m_margin: {x: 0, y: 0, z: 0, w: 0}
233233
m_textInfo:
234234
textComponent: {fileID: 286425399}
235-
characterCount: 1
235+
characterCount: 7
236236
spriteCount: 0
237-
spaceCount: 0
238-
wordCount: 1
237+
spaceCount: 1
238+
wordCount: 2
239239
linkCount: 0
240240
lineCount: 1
241241
pageCount: 1
@@ -266,6 +266,7 @@ GameObject:
266266
- component: {fileID: 7010828750767716061}
267267
- component: {fileID: 7920695922224429018}
268268
- component: {fileID: 93422288}
269+
- component: {fileID: 1012756004489811004}
269270
m_Layer: 0
270271
m_Name: DockController
271272
m_TagString: Untagged
@@ -313,6 +314,103 @@ MonoBehaviour:
313314
m_Name:
314315
m_EditorClassIdentifier:
315316
Canvas: {fileID: 30583751}
317+
dockAudioSource: {fileID: 1012756004489811004}
318+
--- !u!82 &1012756004489811004
319+
AudioSource:
320+
m_ObjectHideFlags: 0
321+
m_CorrespondingSourceObject: {fileID: 0}
322+
m_PrefabInstance: {fileID: 0}
323+
m_PrefabAsset: {fileID: 0}
324+
m_GameObject: {fileID: 1156687259597073108}
325+
m_Enabled: 1
326+
serializedVersion: 4
327+
OutputAudioMixerGroup: {fileID: 0}
328+
m_audioClip: {fileID: 8300000, guid: 13512718ac2aeca439741e10cd3bc6d6, type: 3}
329+
m_PlayOnAwake: 0
330+
m_Volume: 1
331+
m_Pitch: 1
332+
Loop: 0
333+
Mute: 0
334+
Spatialize: 0
335+
SpatializePostEffects: 0
336+
Priority: 128
337+
DopplerLevel: 1
338+
MinDistance: 1
339+
MaxDistance: 500
340+
Pan2D: 0
341+
rolloffMode: 0
342+
BypassEffects: 0
343+
BypassListenerEffects: 0
344+
BypassReverbZones: 0
345+
rolloffCustomCurve:
346+
serializedVersion: 2
347+
m_Curve:
348+
- serializedVersion: 3
349+
time: 0
350+
value: 1
351+
inSlope: 0
352+
outSlope: 0
353+
tangentMode: 0
354+
weightedMode: 0
355+
inWeight: 0.33333334
356+
outWeight: 0.33333334
357+
- serializedVersion: 3
358+
time: 1
359+
value: 0
360+
inSlope: 0
361+
outSlope: 0
362+
tangentMode: 0
363+
weightedMode: 0
364+
inWeight: 0.33333334
365+
outWeight: 0.33333334
366+
m_PreInfinity: 2
367+
m_PostInfinity: 2
368+
m_RotationOrder: 4
369+
panLevelCustomCurve:
370+
serializedVersion: 2
371+
m_Curve:
372+
- serializedVersion: 3
373+
time: 0
374+
value: 0
375+
inSlope: 0
376+
outSlope: 0
377+
tangentMode: 0
378+
weightedMode: 0
379+
inWeight: 0.33333334
380+
outWeight: 0.33333334
381+
m_PreInfinity: 2
382+
m_PostInfinity: 2
383+
m_RotationOrder: 4
384+
spreadCustomCurve:
385+
serializedVersion: 2
386+
m_Curve:
387+
- serializedVersion: 3
388+
time: 0
389+
value: 0
390+
inSlope: 0
391+
outSlope: 0
392+
tangentMode: 0
393+
weightedMode: 0
394+
inWeight: 0.33333334
395+
outWeight: 0.33333334
396+
m_PreInfinity: 2
397+
m_PostInfinity: 2
398+
m_RotationOrder: 4
399+
reverbZoneMixCustomCurve:
400+
serializedVersion: 2
401+
m_Curve:
402+
- serializedVersion: 3
403+
time: 0
404+
value: 1
405+
inSlope: 0
406+
outSlope: 0
407+
tangentMode: 0
408+
weightedMode: 0
409+
inWeight: 0.33333334
410+
outWeight: 0.33333334
411+
m_PreInfinity: 2
412+
m_PostInfinity: 2
413+
m_RotationOrder: 4
316414
--- !u!1 &8527684716588836237
317415
GameObject:
318416
m_ObjectHideFlags: 0
Binary file not shown.

CleanSailingGame_Unity/Assets/0_MyAssets/SFX/DockSFX.mp3.meta

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CleanSailingGame_Unity/Assets/0_MyAssets/Scenes/SampleScene.unity

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57581,18 +57581,6 @@ PrefabInstance:
5758157581
propertyPath: m_IsActive
5758257582
value: 0
5758357583
objectReference: {fileID: 0}
57584-
- target: {fileID: 30583752, guid: 63511e9edc0adbe4f8584933fc3c9210, type: 3}
57585-
propertyPath: m_LocalScale.x
57586-
value: 0.058541555
57587-
objectReference: {fileID: 0}
57588-
- target: {fileID: 30583752, guid: 63511e9edc0adbe4f8584933fc3c9210, type: 3}
57589-
propertyPath: m_LocalScale.y
57590-
value: 0.050674118
57591-
objectReference: {fileID: 0}
57592-
- target: {fileID: 30583752, guid: 63511e9edc0adbe4f8584933fc3c9210, type: 3}
57593-
propertyPath: m_LocalScale.z
57594-
value: 0.06787547
57595-
objectReference: {fileID: 0}
5759657584
- target: {fileID: 4612589583435618206, guid: 63511e9edc0adbe4f8584933fc3c9210,
5759757585
type: 3}
5759857586
propertyPath: m_LocalPosition.x

CleanSailingGame_Unity/Assets/0_MyAssets/Scripts/DockController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
public class DockController : MonoBehaviour
66
{
77
public GameObject Canvas;
8+
public AudioSource dockAudioSource;
89
private bool playerInside = false;
910

1011
private void Start()
@@ -17,6 +18,7 @@ private void Update()
1718
Canvas.transform.LookAt(Camera.main.transform);
1819
if (playerInside && Input.GetKeyUp(KeyCode.E))
1920
{
21+
dockAudioSource.Play();
2022
GameplayManager.instance.UpdateCargoFromDock();
2123
}
2224

0 commit comments

Comments
 (0)