Music Update

This commit is contained in:
JonatanRek 2020-02-01 20:36:50 +01:00
parent 07ec5427a4
commit 046306f6f4
5 changed files with 216 additions and 8 deletions

View File

@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 2404547677224573955} - component: {fileID: 2404547677224573955}
- component: {fileID: 7533051242826683670} - component: {fileID: 7533051242826683670}
- component: {fileID: 3536865177621166868} - component: {fileID: 3536865177621166868}
- component: {fileID: -183831788463918190}
m_Layer: 9 m_Layer: 9
m_Name: BarricadeField m_Name: BarricadeField
m_TagString: BarricadeField m_TagString: BarricadeField
@ -75,6 +76,8 @@ MonoBehaviour:
- {fileID: 5859715434797674372} - {fileID: 5859715434797674372}
offMeshLink: {fileID: 3536865177621166868} offMeshLink: {fileID: 3536865177621166868}
walkPoint: {fileID: 9070811066647654375} walkPoint: {fileID: 9070811066647654375}
audioSource: {fileID: -183831788463918190}
buildSound: {fileID: 8300000, guid: 2bffca641d6de514cb3780b4b3b1497d, type: 3}
--- !u!191 &3536865177621166868 --- !u!191 &3536865177621166868
OffMeshLink: OffMeshLink:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -92,6 +95,102 @@ OffMeshLink:
m_BiDirectional: 1 m_BiDirectional: 1
m_Activated: 1 m_Activated: 1
m_AutoUpdatePositions: 0 m_AutoUpdatePositions: 0
--- !u!82 &-183831788463918190
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2404547677224573953}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
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 &4107548373133362469 --- !u!1 &4107548373133362469
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -15,6 +15,7 @@ GameObject:
- component: {fileID: 8296172668023712162} - component: {fileID: 8296172668023712162}
- component: {fileID: 8296172668023712163} - component: {fileID: 8296172668023712163}
- component: {fileID: 8296172668023712160} - component: {fileID: 8296172668023712160}
- component: {fileID: -2813215890939452537}
m_Layer: 0 m_Layer: 0
m_Name: door m_Name: door
m_TagString: Interact m_TagString: Interact
@ -144,3 +145,103 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
blockType: 2 blockType: 2
health: 100 health: 100
healthRate: 5
amountModels: []
audioSource: {fileID: -2813215890939452537}
doorSound: {fileID: 8300000, guid: 2d61bf54062da3843bc9fa509ef34673, type: 3}
--- !u!82 &-2813215890939452537
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6358013410880778399}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
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

View File

@ -797,7 +797,7 @@ RectTransform:
- {fileID: 1692949638} - {fileID: 1692949638}
- {fileID: 1327297297} - {fileID: 1327297297}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 19 m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@ -992,7 +992,7 @@ Transform:
m_LocalScale: {x: 100, y: 100, z: 100} m_LocalScale: {x: 100, y: 100, z: 100}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 20 m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &802293424 --- !u!1 &802293424
GameObject: GameObject:
@ -1365,7 +1365,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 17 m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1131703976 stripped --- !u!4 &1131703976 stripped
Transform: Transform:
@ -1823,7 +1823,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 16 m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1765588425 --- !u!1001 &1765588425
PrefabInstance: PrefabInstance:
@ -1945,7 +1945,7 @@ MonoBehaviour:
- {fileID: 1131703976} - {fileID: 1131703976}
- {fileID: 675280671} - {fileID: 675280671}
- {fileID: 1872983114} - {fileID: 1872983114}
enemyNumber: 10 enemyStartNumber: 5
Sun: {fileID: 1345459422} Sun: {fileID: 1345459422}
--- !u!4 &1774516110 --- !u!4 &1774516110
Transform: Transform:
@ -1959,7 +1959,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 18 m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1814508279 stripped --- !u!1 &1814508279 stripped
GameObject: GameObject:
@ -2052,7 +2052,7 @@ PrefabInstance:
- target: {fileID: 8150345748488139403, guid: b5bdffdb5058d5e458831042023d3abc, - target: {fileID: 8150345748488139403, guid: b5bdffdb5058d5e458831042023d3abc,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 15 value: 14
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8150345748488139403, guid: b5bdffdb5058d5e458831042023d3abc, - target: {fileID: 8150345748488139403, guid: b5bdffdb5058d5e458831042023d3abc,
type: 3} type: 3}
@ -2888,7 +2888,7 @@ PrefabInstance:
- target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c, - target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 14 value: 20
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c, - target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c,
type: 3} type: 3}

View File

@ -10,6 +10,9 @@ public class BarricadeManager : MonoBehaviour
public OffMeshLink offMeshLink; public OffMeshLink offMeshLink;
public Transform walkPoint; public Transform walkPoint;
public AudioSource audioSource = new AudioSource();
public AudioClip buildSound;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
@ -37,6 +40,7 @@ public class BarricadeManager : MonoBehaviour
public void addPlank() public void addPlank()
{ {
if (health < (barricadePlanks.Count * 50)) { if (health < (barricadePlanks.Count * 50)) {
audioSource.PlayOneShot(buildSound);
health += 50; health += 50;
offMeshLink.enabled = false; offMeshLink.enabled = false;
} }

View File

@ -14,6 +14,9 @@ public class BlockManager : MonoBehaviour
private bool action = false; private bool action = false;
public List<GameObject> amountModels = new List<GameObject>(); public List<GameObject> amountModels = new List<GameObject>();
public AudioSource audioSource = new AudioSource();
public AudioClip doorSound;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
@ -97,6 +100,7 @@ public class BlockManager : MonoBehaviour
{ {
if (!animation.isPlaying) if (!animation.isPlaying)
{ {
audioSource.PlayOneShot(doorSound);
if (!action) if (!action)
{ {
animation["Door"].speed = 1; animation["Door"].speed = 1;