Skip to content

Commit 4f3eeee

Browse files
committedJan 7, 2024
Added sound effects, tweaked spawn location for L1
1 parent 0df78cc commit 4f3eeee

18 files changed

+462
-9
lines changed
 

‎Assets/NmlPrefab/PLAYER.prefab

+131-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Transform:
3131
- {fileID: 8407248330860078467}
3232
- {fileID: 7260955853733957186}
3333
- {fileID: 7163884776327955316}
34+
- {fileID: 5094167249023972477}
3435
m_Father: {fileID: 3127142312930763842}
3536
m_RootOrder: 2
3637
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -213,7 +214,7 @@ AudioSource:
213214
m_Enabled: 1
214215
serializedVersion: 4
215216
OutputAudioMixerGroup: {fileID: 0}
216-
m_audioClip: {fileID: 8300000, guid: 4b6a6d4784753074daa5776c3c7761a7, type: 3}
217+
m_audioClip: {fileID: 8300000, guid: 56dc4c65afe839047adb6a169a162eb5, type: 3}
217218
m_PlayOnAwake: 0
218219
m_Volume: 1
219220
m_Pitch: 1
@@ -721,6 +722,134 @@ MeshRenderer:
721722
m_SortingLayer: 0
722723
m_SortingOrder: 0
723724
m_AdditionalVertexStreams: {fileID: 0}
725+
--- !u!1 &3262985200990270974
726+
GameObject:
727+
m_ObjectHideFlags: 0
728+
m_CorrespondingSourceObject: {fileID: 0}
729+
m_PrefabInstance: {fileID: 0}
730+
m_PrefabAsset: {fileID: 0}
731+
serializedVersion: 6
732+
m_Component:
733+
- component: {fileID: 5094167249023972477}
734+
- component: {fileID: 1601063608768239522}
735+
m_Layer: 2
736+
m_Name: JumpSound
737+
m_TagString: Untagged
738+
m_Icon: {fileID: 0}
739+
m_NavMeshLayer: 0
740+
m_StaticEditorFlags: 0
741+
m_IsActive: 1
742+
--- !u!4 &5094167249023972477
743+
Transform:
744+
m_ObjectHideFlags: 0
745+
m_CorrespondingSourceObject: {fileID: 0}
746+
m_PrefabInstance: {fileID: 0}
747+
m_PrefabAsset: {fileID: 0}
748+
m_GameObject: {fileID: 3262985200990270974}
749+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
750+
m_LocalPosition: {x: 0, y: 0, z: 0}
751+
m_LocalScale: {x: 1, y: 1, z: 1}
752+
m_ConstrainProportionsScale: 0
753+
m_Children: []
754+
m_Father: {fileID: 5216024502677538508}
755+
m_RootOrder: 1
756+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
757+
--- !u!82 &1601063608768239522
758+
AudioSource:
759+
m_ObjectHideFlags: 0
760+
m_CorrespondingSourceObject: {fileID: 0}
761+
m_PrefabInstance: {fileID: 0}
762+
m_PrefabAsset: {fileID: 0}
763+
m_GameObject: {fileID: 3262985200990270974}
764+
m_Enabled: 1
765+
serializedVersion: 4
766+
OutputAudioMixerGroup: {fileID: 0}
767+
m_audioClip: {fileID: 8300000, guid: 7d2ea5e8a11ff6e4597b676aa7831de7, type: 3}
768+
m_PlayOnAwake: 0
769+
m_Volume: 1
770+
m_Pitch: 1
771+
Loop: 0
772+
Mute: 0
773+
Spatialize: 0
774+
SpatializePostEffects: 0
775+
Priority: 128
776+
DopplerLevel: 1
777+
MinDistance: 1
778+
MaxDistance: 500
779+
Pan2D: 0
780+
rolloffMode: 0
781+
BypassEffects: 0
782+
BypassListenerEffects: 0
783+
BypassReverbZones: 0
784+
rolloffCustomCurve:
785+
serializedVersion: 2
786+
m_Curve:
787+
- serializedVersion: 3
788+
time: 0
789+
value: 1
790+
inSlope: 0
791+
outSlope: 0
792+
tangentMode: 0
793+
weightedMode: 0
794+
inWeight: 0.33333334
795+
outWeight: 0.33333334
796+
- serializedVersion: 3
797+
time: 1
798+
value: 0
799+
inSlope: 0
800+
outSlope: 0
801+
tangentMode: 0
802+
weightedMode: 0
803+
inWeight: 0.33333334
804+
outWeight: 0.33333334
805+
m_PreInfinity: 2
806+
m_PostInfinity: 2
807+
m_RotationOrder: 4
808+
panLevelCustomCurve:
809+
serializedVersion: 2
810+
m_Curve:
811+
- serializedVersion: 3
812+
time: 0
813+
value: 0
814+
inSlope: 0
815+
outSlope: 0
816+
tangentMode: 0
817+
weightedMode: 0
818+
inWeight: 0.33333334
819+
outWeight: 0.33333334
820+
m_PreInfinity: 2
821+
m_PostInfinity: 2
822+
m_RotationOrder: 4
823+
spreadCustomCurve:
824+
serializedVersion: 2
825+
m_Curve:
826+
- serializedVersion: 3
827+
time: 0
828+
value: 0
829+
inSlope: 0
830+
outSlope: 0
831+
tangentMode: 0
832+
weightedMode: 0
833+
inWeight: 0.33333334
834+
outWeight: 0.33333334
835+
m_PreInfinity: 2
836+
m_PostInfinity: 2
837+
m_RotationOrder: 4
838+
reverbZoneMixCustomCurve:
839+
serializedVersion: 2
840+
m_Curve:
841+
- serializedVersion: 3
842+
time: 0
843+
value: 1
844+
inSlope: 0
845+
outSlope: 0
846+
tangentMode: 0
847+
weightedMode: 0
848+
inWeight: 0.33333334
849+
outWeight: 0.33333334
850+
m_PreInfinity: 2
851+
m_PostInfinity: 2
852+
m_RotationOrder: 4
724853
--- !u!1 &5101665568483042092
725854
GameObject:
726855
m_ObjectHideFlags: 0
@@ -763,7 +892,7 @@ AudioSource:
763892
m_Enabled: 1
764893
serializedVersion: 4
765894
OutputAudioMixerGroup: {fileID: 0}
766-
m_audioClip: {fileID: 8300000, guid: 99e9b76c9ad15c94eb52f3762df915ad, type: 3}
895+
m_audioClip: {fileID: 8300000, guid: 814719630f8aec24ea87e6ef851cc6ee, type: 3}
767896
m_PlayOnAwake: 0
768897
m_Volume: 1
769898
m_Pitch: 1

‎Assets/PeterF/CreateObject.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ public class CreateObject : MonoBehaviour
77
[SerializeField] GameObject _item;
88
[SerializeField] Vector3 _offset = new Vector3(1, 0, 0);
99
float approxSize;
10-
10+
public AudioSource beep;
11+
private void Start()
12+
{
13+
beep = GetComponent<AudioSource>();
14+
}
1115
public void SpawnObject()
1216
{
1317
approxSize = transform.lossyScale.x + transform.lossyScale.z;
1418
approxSize = (float)approxSize/2;
1519
Instantiate(_item, transform.position + (_offset * approxSize), transform.rotation, transform.parent);
20+
beep.Play();
1621
}
1722
}
1823

‎Assets/PointerBlock.prefab

+99-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ GameObject:
1515
- component: {fileID: 3159990613207441580}
1616
- component: {fileID: 1368480546729632258}
1717
- component: {fileID: 5203211969525080809}
18+
- component: {fileID: 810629202697356026}
1819
m_Layer: 0
1920
m_Name: PointerBlock
2021
m_TagString: Untagged
@@ -35,7 +36,7 @@ Transform:
3536
m_ConstrainProportionsScale: 0
3637
m_Children: []
3738
m_Father: {fileID: 0}
38-
m_RootOrder: -1
39+
m_RootOrder: 0
3940
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
4041
--- !u!33 &1065895748406858476
4142
MeshFilter:
@@ -146,3 +147,100 @@ MonoBehaviour:
146147
m_EditorClassIdentifier:
147148
_item: {fileID: 7375881760481428545, guid: 25ec742b106c5a5438a604bd3abdc847, type: 3}
148149
_offset: {x: 1, y: 0, z: 0}
150+
beep: {fileID: 0}
151+
--- !u!82 &810629202697356026
152+
AudioSource:
153+
m_ObjectHideFlags: 0
154+
m_CorrespondingSourceObject: {fileID: 0}
155+
m_PrefabInstance: {fileID: 0}
156+
m_PrefabAsset: {fileID: 0}
157+
m_GameObject: {fileID: 7597959029890841122}
158+
m_Enabled: 1
159+
serializedVersion: 4
160+
OutputAudioMixerGroup: {fileID: 0}
161+
m_audioClip: {fileID: 8300000, guid: f46034c19c98da84291eb7a739bd6f97, type: 3}
162+
m_PlayOnAwake: 0
163+
m_Volume: 1
164+
m_Pitch: 1
165+
Loop: 0
166+
Mute: 0
167+
Spatialize: 0
168+
SpatializePostEffects: 0
169+
Priority: 128
170+
DopplerLevel: 1
171+
MinDistance: 1
172+
MaxDistance: 500
173+
Pan2D: 0
174+
rolloffMode: 0
175+
BypassEffects: 0
176+
BypassListenerEffects: 0
177+
BypassReverbZones: 0
178+
rolloffCustomCurve:
179+
serializedVersion: 2
180+
m_Curve:
181+
- serializedVersion: 3
182+
time: 0
183+
value: 1
184+
inSlope: 0
185+
outSlope: 0
186+
tangentMode: 0
187+
weightedMode: 0
188+
inWeight: 0.33333334
189+
outWeight: 0.33333334
190+
- serializedVersion: 3
191+
time: 1
192+
value: 0
193+
inSlope: 0
194+
outSlope: 0
195+
tangentMode: 0
196+
weightedMode: 0
197+
inWeight: 0.33333334
198+
outWeight: 0.33333334
199+
m_PreInfinity: 2
200+
m_PostInfinity: 2
201+
m_RotationOrder: 4
202+
panLevelCustomCurve:
203+
serializedVersion: 2
204+
m_Curve:
205+
- serializedVersion: 3
206+
time: 0
207+
value: 0
208+
inSlope: 0
209+
outSlope: 0
210+
tangentMode: 0
211+
weightedMode: 0
212+
inWeight: 0.33333334
213+
outWeight: 0.33333334
214+
m_PreInfinity: 2
215+
m_PostInfinity: 2
216+
m_RotationOrder: 4
217+
spreadCustomCurve:
218+
serializedVersion: 2
219+
m_Curve:
220+
- serializedVersion: 3
221+
time: 0
222+
value: 0
223+
inSlope: 0
224+
outSlope: 0
225+
tangentMode: 0
226+
weightedMode: 0
227+
inWeight: 0.33333334
228+
outWeight: 0.33333334
229+
m_PreInfinity: 2
230+
m_PostInfinity: 2
231+
m_RotationOrder: 4
232+
reverbZoneMixCustomCurve:
233+
serializedVersion: 2
234+
m_Curve:
235+
- serializedVersion: 3
236+
time: 0
237+
value: 1
238+
inSlope: 0
239+
outSlope: 0
240+
tangentMode: 0
241+
weightedMode: 0
242+
inWeight: 0.33333334
243+
outWeight: 0.33333334
244+
m_PreInfinity: 2
245+
m_PostInfinity: 2
246+
m_RotationOrder: 4

‎Assets/Scenes/Level1.unity

+1-1
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ PrefabInstance:
15881588
- target: {fileID: 3237927744802066517, guid: a89c88f66ed3aa5439d4d2594060bf64,
15891589
type: 3}
15901590
propertyPath: m_LocalPosition.x
1591-
value: -0.5549988
1591+
value: -0.802
15921592
objectReference: {fileID: 0}
15931593
- target: {fileID: 3237927744802066517, guid: a89c88f66ed3aa5439d4d2594060bf64,
15941594
type: 3}

‎Assets/Script/Environment/JumperBumper.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ public class JumperBumper : MonoBehaviour
66
{
77
public float power;
88
bool animate;
9+
int playSnd;
910
float animCounter;
1011
public float counterSpeed;
11-
float animatorSize = 82;
12+
float animatorSize = 82; AudioSource jumpSoundControl;
1213
Transform animator;
1314

1415
// Start is called before the first frame update
1516
void Start()
1617
{
1718
if (counterSpeed == 0f) { counterSpeed = 8f; }
1819
animator = transform.Find("hose");
20+
jumpSoundControl = gameObject.GetComponent<AudioSource>();
1921
}
2022

2123
// Update is called once per frame
@@ -33,6 +35,8 @@ void FixedUpdate()
3335
}
3436

3537
}
38+
if (playSnd == 6) { jumpSoundControl.Play(); }
39+
if(playSnd>0) { playSnd--; }
3640
}
3741
private void OnTriggerEnter(Collider other)
3842
{
@@ -42,7 +46,7 @@ private void OnTriggerEnter(Collider other)
4246
other.gameObject.transform.parent.parent.GetComponent<PlayerMovement>().speed2 *= 0.5f;
4347

4448
other.gameObject.transform.parent.parent.transform.Translate(Vector3.up*transform.lossyScale.y);
45-
animate = true; animCounter = 0f;
49+
animate = true; animCounter = 0f; playSnd = 6;
4650
}
4751
}
4852
}

‎Assets/Script/Player/PlayerMovement.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ public class PlayerMovement : MonoBehaviour
5252
public Transform debugCubeUp;
5353
public Transform dropShadow;
5454
GameObject launchSoundObj;
55+
GameObject jumpSoundObj;
5556
public Transform characterAnimator;
56-
AudioSource launchSoundControl;
57+
AudioSource launchSoundControl;
58+
AudioSource jumpSoundControl;
5759
MeshRenderer dropShadowGraphics;
5860
//float currentSpeed;
5961
//float currentrunAngle;
@@ -78,7 +80,9 @@ void Start()
7880
//Get component collections
7981
debugCube = transform.Find("Data");
8082
launchSoundObj = debugCube.Find("Sound").Find("LaunchSound").gameObject;
83+
jumpSoundObj = debugCube.Find("Sound").Find("JumpSound").gameObject;
8184
launchSoundControl = launchSoundObj.GetComponent<AudioSource>();
85+
jumpSoundControl = jumpSoundObj.GetComponent<AudioSource>();
8286
dropShadow = transform.Find("dropShadow");
8387
dropShadowGraphics = dropShadow.gameObject.GetComponent<MeshRenderer>();
8488
characterAnimator = transform.Find("body");
@@ -358,6 +362,7 @@ private void JumpHesitate()
358362
{
359363
transform.Translate(transform.up * (transform.localScale.y * 0.25f), Space.World);
360364
playerActionMode = 9;
365+
jumpSoundControl.Play();
361366
}
362367
}
363368

‎Assets/Sound/beansLaunch.wav

86.2 KB
Binary file not shown.

‎Assets/Sound/beansLaunch.wav.meta

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Assets/Sound/beansbumpr.wav

92 KB
Binary file not shown.

0 commit comments

Comments
 (0)