AnneLise bird counter implemented
This commit is contained in:
@@ -421,7 +421,7 @@ AnimationClip:
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events:
|
||||
- time: 0
|
||||
functionName: PlayPhotoSoundBite
|
||||
functionName: AnimStarted
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
|
||||
@@ -690,6 +690,13 @@ AnimationClip:
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events:
|
||||
- time: 0.33333334
|
||||
functionName: Flash
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
- time: 1.7833333
|
||||
functionName: PhotoTaken
|
||||
data:
|
||||
|
||||
@@ -9,6 +9,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 536416456044738252}
|
||||
- component: {fileID: 6629069534496617365}
|
||||
m_Layer: 0
|
||||
m_Name: SoundManager
|
||||
m_TagString: Untagged
|
||||
@@ -31,3 +32,15 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6629069534496617365
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5034240524438268576}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d8bd90cfc02c8274fac5ce090285ed6a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
|
||||
@@ -649,6 +649,7 @@ GameObject:
|
||||
- component: {fileID: 2995561023563842343}
|
||||
- component: {fileID: 7053055077639234121}
|
||||
- component: {fileID: 578146208477020881}
|
||||
- component: {fileID: 1193493154550576580}
|
||||
- component: {fileID: 7652960462502122104}
|
||||
m_Layer: 0
|
||||
m_Name: AnneLiseBush
|
||||
@@ -734,6 +735,27 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 603ecc4a6ab6bb84c8cb9773fa310b69, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
--- !u!114 &1193493154550576580
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5943355783477523754}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: edc43a9f07fedb44abb68b06c71d17ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
VOPlayer: {fileID: 7652960462502122104}
|
||||
SFXPlayer: {fileID: 5129281429389775297}
|
||||
reactionClipToPlay: {fileID: 0}
|
||||
flashSFXClipToPlay: {fileID: 8300000, guid: 2ac461fcc3f7a014ca716a4f231be004, type: 3}
|
||||
birdCounterClip:
|
||||
- {fileID: 8300000, guid: 60d02b75b267d5949a36f04bb5dfe409, type: 3}
|
||||
- {fileID: 8300000, guid: 86dc2e8f9a1cf7440adccad824209334, type: 3}
|
||||
- {fileID: 8300000, guid: 2446033223f0de14bab42a40b36a5e1a, type: 3}
|
||||
- {fileID: 8300000, guid: 1803dc83ad49a6543882628a46d5701a, type: 3}
|
||||
--- !u!82 &7652960462502122104
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -831,6 +853,135 @@ AudioSource:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1 &6948354193133336628
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6330838396794415978}
|
||||
- component: {fileID: 5129281429389775297}
|
||||
m_Layer: 0
|
||||
m_Name: SFXAudio
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6330838396794415978
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6948354193133336628}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 91.058014, y: 38.410133, z: 0}
|
||||
m_LocalScale: {x: -1, y: 0.8928573, z: 0.8928573}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6911087736377923223}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &5129281429389775297
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6948354193133336628}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 1171626333864818265, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1 &7019503702609181254
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1066,6 +1217,7 @@ Transform:
|
||||
- {fileID: 6292368405587000872}
|
||||
- {fileID: 8296261693726818812}
|
||||
- {fileID: 4304786163860520790}
|
||||
- {fileID: 6330838396794415978}
|
||||
m_Father: {fileID: 8259693476957892150}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &3552553650332385501
|
||||
@@ -1114,9 +1266,37 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 260954bde403f504c84c67f22b8a5888, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::TakePhotoState
|
||||
audioPlayer: {fileID: 7652960462502122104}
|
||||
clipToPlay: {fileID: 0}
|
||||
playerTargetObject: {fileID: 4304786163860520790}
|
||||
animFlash:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1193493154550576580}
|
||||
m_TargetAssemblyTypeName: BushAudioController, AppleHillsScripts
|
||||
m_MethodName: PlayFlashSound
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
animStart:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1193493154550576580}
|
||||
m_TargetAssemblyTypeName: BushAudioController, AppleHillsScripts
|
||||
m_MethodName: PlayPhotoSoundBite
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!61 &962877523590950341
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -438692,10 +438692,22 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: birdGameStats
|
||||
value:
|
||||
objectReference: {fileID: 708284665}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 33f05a858a3520a45bdec9db2cc6693c, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: clipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 33f05a858a3520a45bdec9db2cc6693c, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 33f05a858a3520a45bdec9db2cc6693c, type: 3}
|
||||
- target: {fileID: 4630528656982513176, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
@@ -440281,6 +440293,51 @@ GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
m_PrefabInstance: {fileID: 705662619}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &708284664
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 708284666}
|
||||
- component: {fileID: 708284665}
|
||||
m_Layer: 0
|
||||
m_Name: BirdGameStats
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &708284665
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 708284664}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 47259b63379fb1b40aa2650a13f01fd1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
birdsLeftInLevel: 0
|
||||
--- !u!4 &708284666
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 708284664}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 59.84865, y: -34.63395, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &713720583
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -442270,10 +442327,22 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: birdGameStats
|
||||
value:
|
||||
objectReference: {fileID: 708284665}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 0ca909ee49d83134d9040e527ba94af4, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: clipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 0ca909ee49d83134d9040e527ba94af4, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 0ca909ee49d83134d9040e527ba94af4, type: 3}
|
||||
- target: {fileID: 4630528656982513176, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
@@ -447073,10 +447142,22 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: birdGameStats
|
||||
value:
|
||||
objectReference: {fileID: 708284665}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 7f50be799ffea92458277c5e88ce29a5, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: clipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 7f50be799ffea92458277c5e88ce29a5, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 7f50be799ffea92458277c5e88ce29a5, type: 3}
|
||||
- target: {fileID: 4630528656982513176, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
@@ -468556,10 +468637,22 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: birdGameStats
|
||||
value:
|
||||
objectReference: {fileID: 708284665}
|
||||
- target: {fileID: 1193493154550576580, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 2419f718f73907749a2940ac09d65238, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: clipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 2419f718f73907749a2940ac09d65238, type: 3}
|
||||
- target: {fileID: 1494215563975893862, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: reactionClipToPlay
|
||||
value:
|
||||
objectReference: {fileID: 8300000, guid: 2419f718f73907749a2940ac09d65238, type: 3}
|
||||
- target: {fileID: 3447019054705970104, guid: 9b2926886934b554f9a1727331d34787, type: 3}
|
||||
propertyPath: m_Resource
|
||||
value:
|
||||
@@ -471215,3 +471308,4 @@ SceneRoots:
|
||||
- {fileID: 841182293}
|
||||
- {fileID: 477911181}
|
||||
- {fileID: 1374202465}
|
||||
- {fileID: 708284666}
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"Unity.InputSystem",
|
||||
"Unity.TextMeshPro",
|
||||
"OptimizedRope",
|
||||
"Unity.Cinemachine"
|
||||
"Unity.Cinemachine",
|
||||
"AudioSourceEvents"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
19
Assets/Scripts/PuzzleS/BirdGameStats.cs
Normal file
19
Assets/Scripts/PuzzleS/BirdGameStats.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BirdGameStats : MonoBehaviour
|
||||
{
|
||||
public int birdsFoundInLevel;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void BirdFound()
|
||||
{
|
||||
birdsFoundInLevel += 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
2
Assets/Scripts/PuzzleS/BirdGameStats.cs.meta
Normal file
2
Assets/Scripts/PuzzleS/BirdGameStats.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47259b63379fb1b40aa2650a13f01fd1
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 423ebef95a1a80540a39e097c4a2c206
|
||||
guid: 2a75c1b14d7422744b5db564d48f8651
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
16
Assets/Scripts/Sound/AudioManager.cs
Normal file
16
Assets/Scripts/Sound/AudioManager.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class AudioManager : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Sound/AudioManager.cs.meta
Normal file
2
Assets/Scripts/Sound/AudioManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8bd90cfc02c8274fac5ce090285ed6a
|
||||
55
Assets/Scripts/Sound/BushAudioController.cs
Normal file
55
Assets/Scripts/Sound/BushAudioController.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using AudioSourceEvents;
|
||||
using Input;
|
||||
using System;
|
||||
using System.Diagnostics.Tracing;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public class BushAudioController : MonoBehaviour
|
||||
{
|
||||
private IAudioEventSource _eventSource;
|
||||
public AudioSource VOPlayer;
|
||||
public AudioSource SFXPlayer;
|
||||
public AudioResource reactionClipToPlay;
|
||||
public AudioResource flashSFXClipToPlay;
|
||||
|
||||
public BirdGameStats birdGameStats;
|
||||
public AudioResource[] birdCounterClip;
|
||||
private int _birdCounter;
|
||||
|
||||
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
_eventSource = VOPlayer.RequestEventHandlers();
|
||||
_eventSource.AudioStopped += PlayBirdCounter;
|
||||
|
||||
}
|
||||
|
||||
public void PlayPhotoSoundBite()
|
||||
{
|
||||
VOPlayer.resource = reactionClipToPlay;
|
||||
VOPlayer.Play();
|
||||
}
|
||||
|
||||
public void PlayFlashSound()
|
||||
{
|
||||
SFXPlayer.resource = flashSFXClipToPlay;
|
||||
SFXPlayer.Play();
|
||||
}
|
||||
|
||||
private void PlayBirdCounter(object sender, EventArgs e)
|
||||
{
|
||||
VOPlayer.resource = birdCounterClip[birdGameStats.birdsFoundInLevel];
|
||||
VOPlayer.Play();
|
||||
birdGameStats.BirdFound();
|
||||
_eventSource.AudioStopped -= PlayBirdCounter;
|
||||
}
|
||||
|
||||
public void OnDisable()
|
||||
{
|
||||
// Unsubscribe from events when disabled
|
||||
_eventSource.AudioStopped -= PlayBirdCounter;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Sound/BushAudioController.cs.meta
Normal file
2
Assets/Scripts/Sound/BushAudioController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edc43a9f07fedb44abb68b06c71d17ea
|
||||
@@ -5,17 +5,20 @@ using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.Events;
|
||||
using static Input.PlayerTouchController;
|
||||
using System;
|
||||
|
||||
|
||||
public class TakePhotoState : State
|
||||
{
|
||||
public AudioSource audioPlayer;
|
||||
public AudioResource clipToPlay;
|
||||
|
||||
public Transform playerTargetObject;
|
||||
private GameObject playerCharacter;
|
||||
private PlayerTouchController playerTouchController;
|
||||
private Vector3 newPlayerPosition;
|
||||
|
||||
|
||||
public UnityEvent animFlash;
|
||||
public UnityEvent animStart;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
playerCharacter = GameObject.FindWithTag("Player");
|
||||
@@ -26,6 +29,7 @@ public class TakePhotoState : State
|
||||
playerTouchController.InterruptMoveTo();
|
||||
playerTouchController.MoveToAndNotify(newPlayerPosition);
|
||||
InputManager.Instance.SetInputMode(InputMode.InputDisabled);
|
||||
|
||||
}
|
||||
|
||||
// When the player has arrived at the bush do Animator.SetTrigger(Takephoto) and whatevs
|
||||
@@ -42,9 +46,21 @@ public class TakePhotoState : State
|
||||
playerTouchController.OnArrivedAtTarget -= PlayerHasArrived;
|
||||
}
|
||||
|
||||
public void PlayPhotoSoundBite()
|
||||
private void OnDisable()
|
||||
{
|
||||
audioPlayer.resource = clipToPlay;
|
||||
audioPlayer.Play();
|
||||
playerTouchController.OnArrivedAtTarget -= PlayerHasArrived;
|
||||
|
||||
}
|
||||
|
||||
public void AnimStarted()
|
||||
{
|
||||
animStart.Invoke();
|
||||
}
|
||||
|
||||
public void Flash()
|
||||
{
|
||||
animFlash.Invoke();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
BIN
Assets/Sound/Quarry/TEMPAUDIO/camera_flash.wav
Normal file
BIN
Assets/Sound/Quarry/TEMPAUDIO/camera_flash.wav
Normal file
Binary file not shown.
23
Assets/Sound/Quarry/TEMPAUDIO/camera_flash.wav.meta
Normal file
23
Assets/Sound/Quarry/TEMPAUDIO/camera_flash.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ac461fcc3f7a014ca716a4f231be004
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
71
Assets/Sound/Quarry/Voices/AnneLise/birdCounterAudio.asset
Normal file
71
Assets/Sound/Quarry/Voices/AnneLise/birdCounterAudio.asset
Normal file
@@ -0,0 +1,71 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1233149941 &5888169292782101467
|
||||
AudioContainerElement:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 1bird_{5888169292782101467}
|
||||
m_AudioClip: {fileID: 8300000, guid: 2446033223f0de14bab42a40b36a5e1a, type: 3}
|
||||
m_Volume: 0
|
||||
m_Enabled: 1
|
||||
--- !u!1307931743 &6418180475301049370
|
||||
AudioRandomContainer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: birdCounterAudio
|
||||
m_Volume: 0
|
||||
m_Pitch: 0
|
||||
m_AutomaticTriggerTime: 0
|
||||
m_LoopCount: 1
|
||||
m_VolumeRandomizationRange: {x: 0, y: 0}
|
||||
m_PitchRandomizationRange: {x: 0, y: 0}
|
||||
m_AutomaticTriggerTimeRandomizationRange: {x: 0, y: 0}
|
||||
m_LoopCountRandomizationRange: {x: 0, y: 0}
|
||||
m_Elements:
|
||||
- {fileID: 8031590168900661445}
|
||||
- {fileID: 7046197025720374664}
|
||||
- {fileID: 5888169292782101467}
|
||||
- {fileID: 6961595029314351120}
|
||||
m_AvoidRepeatingLast: 0
|
||||
m_PlaybackMode: 0
|
||||
m_TriggerMode: 0
|
||||
m_AutomaticTriggerMode: 1
|
||||
m_LoopMode: 2
|
||||
m_VolumeRandomizationEnabled: 0
|
||||
m_PitchRandomizationEnabled: 0
|
||||
m_AutomaticTriggerTimeRandomizationEnabled: 0
|
||||
m_LoopCountRandomizationEnabled: 0
|
||||
--- !u!1233149941 &6961595029314351120
|
||||
AudioContainerElement:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 0bird_{6961595029314351120}
|
||||
m_AudioClip: {fileID: 8300000, guid: 1803dc83ad49a6543882628a46d5701a, type: 3}
|
||||
m_Volume: 0
|
||||
m_Enabled: 1
|
||||
--- !u!1233149941 &7046197025720374664
|
||||
AudioContainerElement:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 2birds_{7046197025720374664}
|
||||
m_AudioClip: {fileID: 8300000, guid: 86dc2e8f9a1cf7440adccad824209334, type: 3}
|
||||
m_Volume: 0
|
||||
m_Enabled: 1
|
||||
--- !u!1233149941 &8031590168900661445
|
||||
AudioContainerElement:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 3birds_{8031590168900661445}
|
||||
m_AudioClip: {fileID: 8300000, guid: 60d02b75b267d5949a36f04bb5dfe409, type: 3}
|
||||
m_Volume: 0
|
||||
m_Enabled: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02ff958a82d9cc6478783a0e7cd3b2b1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 6418180475301049370
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user