sound stuff
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 232101579b799754f9e1b5a79181c7cc
|
||||||
|
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:
|
||||||
@@ -13,6 +13,7 @@ GameObject:
|
|||||||
- component: {fileID: -1492744888846132070}
|
- component: {fileID: -1492744888846132070}
|
||||||
- component: {fileID: -3335685204144903253}
|
- component: {fileID: -3335685204144903253}
|
||||||
- component: {fileID: 7517693285539812101}
|
- component: {fileID: 7517693285539812101}
|
||||||
|
- component: {fileID: 2032703659837756860}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: DryLeafNew_0 1
|
m_Name: DryLeafNew_0 1
|
||||||
m_TagString: Platform
|
m_TagString: Platform
|
||||||
@@ -172,3 +173,102 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::LeafDissolve
|
m_EditorClassIdentifier: Assembly-CSharp::LeafDissolve
|
||||||
maxStandingTime: 1
|
maxStandingTime: 1
|
||||||
|
speaker: {fileID: 2032703659837756860}
|
||||||
|
leafesound: {fileID: 8300000, guid: 232101579b799754f9e1b5a79181c7cc, type: 3}
|
||||||
|
--- !u!82 &2032703659837756860
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1463382805851734624}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 0}
|
||||||
|
m_Resource: {fileID: 8300000, guid: 232101579b799754f9e1b5a79181c7cc, type: 3}
|
||||||
|
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
|
||||||
|
|||||||
@@ -1322,7 +1322,7 @@ AudioSource:
|
|||||||
m_audioClip: {fileID: 0}
|
m_audioClip: {fileID: 0}
|
||||||
m_Resource: {fileID: 0}
|
m_Resource: {fileID: 0}
|
||||||
m_PlayOnAwake: 1
|
m_PlayOnAwake: 1
|
||||||
m_Volume: 1
|
m_Volume: 0.5
|
||||||
m_Pitch: 1
|
m_Pitch: 1
|
||||||
Loop: 0
|
Loop: 0
|
||||||
Mute: 0
|
Mute: 0
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ public class LeafDissolve : MonoBehaviour
|
|||||||
|
|
||||||
private BoxCollider2D collider;
|
private BoxCollider2D collider;
|
||||||
|
|
||||||
|
//audio stuff
|
||||||
|
public AudioSource speaker;
|
||||||
|
public AudioClip leafesound;
|
||||||
|
|
||||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@@ -58,6 +62,9 @@ public class LeafDissolve : MonoBehaviour
|
|||||||
if (!isDissolving && standingTime >= maxStandingTime / 2)
|
if (!isDissolving && standingTime >= maxStandingTime / 2)
|
||||||
{
|
{
|
||||||
isDissolving = true;
|
isDissolving = true;
|
||||||
|
|
||||||
|
//audio
|
||||||
|
speaker.PlayOneShot(leafesound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user