Добавлены звуки для куба
This commit is contained in:
parent
4a89fc3026
commit
a878cfe8ac
@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 8039207184498597514}
|
||||
- component: {fileID: 331023456886542288}
|
||||
- component: {fileID: 1528631932536492394}
|
||||
- component: {fileID: 58624349632693913}
|
||||
m_Layer: 0
|
||||
m_Name: 1. Cube
|
||||
m_TagString: Untagged
|
||||
@ -100,6 +101,103 @@ Animator:
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!82 &58624349632693913
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3388591762507178167}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
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 &8034269169938238613
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
11
Assets/AnimSfxPlayer.cs
Normal file
11
Assets/AnimSfxPlayer.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class AnimSfxPlayer : StateMachineBehaviour
|
||||
{
|
||||
[SerializeField] private AudioClip _clip;
|
||||
[SerializeField, Range(0, 1)] private float _relativeVolume = 1;
|
||||
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
||||
{
|
||||
animator.GetComponent<AudioSource>().PlayOneShot(_clip, _relativeVolume);
|
||||
}
|
||||
}
|
||||
2
Assets/AnimSfxPlayer.cs.meta
Normal file
2
Assets/AnimSfxPlayer.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b96577c9b2eb7643901e0e3666bb89e
|
||||
@ -25,6 +25,20 @@ AnimatorStateTransition:
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 0
|
||||
--- !u!114 &-7429592985429016638
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer
|
||||
_clip: {fileID: 8300000, guid: 9685f1b8f5b780e4095bf50bb5770282, type: 3}
|
||||
_relativeVolume: 1
|
||||
--- !u!1101 &-7150632859244814381
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -62,7 +76,8 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -602570347048702700}
|
||||
m_StateMachineBehaviours: []
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: -7429592985429016638}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
@ -96,6 +111,7 @@ MonoBehaviour:
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
_instantSwitch: 0
|
||||
--- !u!1101 &-5697671000731039081
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -133,7 +149,8 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 5372227249838831858}
|
||||
m_StateMachineBehaviours: []
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: 966664211623692489}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
@ -148,6 +165,34 @@ AnimatorState:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!114 &-5267897620875417393
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer
|
||||
_clip: {fileID: 8300000, guid: ca76eb3cfe778f64b9eaf944717a34a4, type: 3}
|
||||
_relativeVolume: 1
|
||||
--- !u!114 &-2779878638914207901
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer
|
||||
_clip: {fileID: 8300000, guid: 089e9e0bbcac7104bbf00d1163550f04, type: 3}
|
||||
_relativeVolume: 1
|
||||
--- !u!1101 &-2657751550537078569
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -207,7 +252,8 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -1687643949439196156}
|
||||
m_StateMachineBehaviours: []
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: 1636448997929893962}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
@ -229,10 +275,7 @@ AnimatorStateTransition:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Idle
|
||||
m_EventTreshold: 0
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 5104166289829408018}
|
||||
m_Solo: 0
|
||||
@ -259,7 +302,8 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 2206614485083948045}
|
||||
m_StateMachineBehaviours: []
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: -2779878638914207901}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
@ -363,7 +407,8 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 4053007077391768389}
|
||||
m_StateMachineBehaviours: []
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: -5267897620875417393}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
@ -403,6 +448,34 @@ AnimatorStateTransition:
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 0
|
||||
--- !u!114 &966664211623692489
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer
|
||||
_clip: {fileID: 8300000, guid: 089e9e0bbcac7104bbf00d1163550f04, type: 3}
|
||||
_relativeVolume: 1
|
||||
--- !u!114 &1636448997929893962
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer
|
||||
_clip: {fileID: 8300000, guid: 089e9e0bbcac7104bbf00d1163550f04, type: 3}
|
||||
_relativeVolume: 1
|
||||
--- !u!1101 &2206614485083948045
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -425,6 +498,34 @@ AnimatorStateTransition:
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!114 &2395771590327676003
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer
|
||||
_clip: {fileID: 8300000, guid: 06d94813ba0e12a4ea57ce8480c75f70, type: 3}
|
||||
_relativeVolume: 1
|
||||
--- !u!114 &2583175169218454795
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer
|
||||
_clip: {fileID: 8300000, guid: 9b93e7019dad2aa40b899f2f9480a778, type: 3}
|
||||
_relativeVolume: 1
|
||||
--- !u!1101 &2749330595987890861
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -707,7 +808,8 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 3254519814000987391}
|
||||
m_StateMachineBehaviours: []
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: 2395771590327676003}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
@ -734,7 +836,8 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 7466203507515248281}
|
||||
m_StateMachineBehaviours: []
|
||||
m_StateMachineBehaviours:
|
||||
- {fileID: 2583175169218454795}
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
|
||||
@ -421,25 +421,25 @@ AnimatorStateMachine:
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 5065221806720206088}
|
||||
m_Position: {x: 300, y: 200, z: 0}
|
||||
m_Position: {x: 500, y: 200, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -2788903740698566944}
|
||||
m_Position: {x: 600, y: -30, z: 0}
|
||||
m_Position: {x: 810, y: -10, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5013653162103904771}
|
||||
m_Position: {x: -230, y: 120, z: 0}
|
||||
m_Position: {x: -140, y: 130, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -8530628451578825932}
|
||||
m_Position: {x: 600, y: 30, z: 0}
|
||||
m_Position: {x: 810, y: 50, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -1368940986197246744}
|
||||
m_Position: {x: 100, y: -50, z: 0}
|
||||
m_Position: {x: 250, y: 60, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 5202742613501531865}
|
||||
m_Position: {x: 600, y: 100, z: 0}
|
||||
m_Position: {x: 810, y: 120, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 5718452724475859435}
|
||||
m_Position: {x: 300, y: 40, z: 0}
|
||||
m_Position: {x: 500, y: 60, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5367947394430764701}
|
||||
m_Position: {x: 0, y: 200, z: 0}
|
||||
@ -451,8 +451,8 @@ AnimatorStateMachine:
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 40, y: 70, z: 0}
|
||||
m_EntryPosition: {x: 0, y: 270, z: 0}
|
||||
m_AnyStatePosition: {x: 20, y: 70, z: 0}
|
||||
m_EntryPosition: {x: 20, y: 270, z: 0}
|
||||
m_ExitPosition: {x: 970, y: 250, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: -5367947394430764701}
|
||||
|
||||
@ -533,7 +533,10 @@ AnimatorStateTransition:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Sleep
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -2081372429537587852}
|
||||
m_Solo: 0
|
||||
|
||||
8
Assets/CharacterSound.meta
Normal file
8
Assets/CharacterSound.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e904dbc53f571bc409c4a0b3aff3808d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/CharacterSound/1. CubeSounds.meta
Normal file
8
Assets/CharacterSound/1. CubeSounds.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5056870893e09f54db703e117182f899
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav
Normal file
BIN
Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav
Normal file
Binary file not shown.
23
Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav.meta
Normal file
23
Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06d94813ba0e12a4ea57ce8480c75f70
|
||||
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:
|
||||
BIN
Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav
Normal file
BIN
Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav
Normal file
Binary file not shown.
23
Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav.meta
Normal file
23
Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 089e9e0bbcac7104bbf00d1163550f04
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 1
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/CharacterSound/1. CubeSounds/Cube Win.mp3
Normal file
BIN
Assets/CharacterSound/1. CubeSounds/Cube Win.mp3
Normal file
Binary file not shown.
23
Assets/CharacterSound/1. CubeSounds/Cube Win.mp3.meta
Normal file
23
Assets/CharacterSound/1. CubeSounds/Cube Win.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9685f1b8f5b780e4095bf50bb5770282
|
||||
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:
|
||||
BIN
Assets/CharacterSound/1. CubeSounds/Cube appearing.wav
Normal file
BIN
Assets/CharacterSound/1. CubeSounds/Cube appearing.wav
Normal file
Binary file not shown.
23
Assets/CharacterSound/1. CubeSounds/Cube appearing.wav.meta
Normal file
23
Assets/CharacterSound/1. CubeSounds/Cube appearing.wav.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b93e7019dad2aa40b899f2f9480a778
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 1
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/CharacterSound/1. CubeSounds/CubeLose.mp3
Normal file
BIN
Assets/CharacterSound/1. CubeSounds/CubeLose.mp3
Normal file
Binary file not shown.
23
Assets/CharacterSound/1. CubeSounds/CubeLose.mp3.meta
Normal file
23
Assets/CharacterSound/1. CubeSounds/CubeLose.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca76eb3cfe778f64b9eaf944717a34a4
|
||||
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:
|
||||
21
Assets/Data/1. Cube.asset
Normal file
21
Assets/Data/1. Cube.asset
Normal file
@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fb10f9bdeb89ca14d8ed3d5824e2651d, type: 3}
|
||||
m_Name: 1. Cube
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CharacterSystem.ReplicasContainer
|
||||
_appearReplicas: {fileID: 0}
|
||||
_playerTurnReplicas: {fileID: 0}
|
||||
_botTurnReplicas: {fileID: 0}
|
||||
_playerWinReplicas: {fileID: 0}
|
||||
_botWinReplicas: {fileID: 0}
|
||||
_returnReplicas: {fileID: 0}
|
||||
_drawReplicas: {fileID: 0}
|
||||
8
Assets/Data/1. Cube.asset.meta
Normal file
8
Assets/Data/1. Cube.asset.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a042f31f2c98b64fb2511191b1d1001
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Prefabs/Characters.meta
Normal file
8
Assets/Prefabs/Characters.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e46df9c05299444b988225b07940260
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -171,6 +171,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: 6. BoyNextDoor
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6069554613919803763, guid: a6618e61e181953458cf6769884c4403, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@ -365,6 +369,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: 4. Sam
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7238525776732110314, guid: d2448bca251e50a4ebaae923084264a0, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@ -382,13 +390,25 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: 3. Wolf
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4672236760054860725, guid: eb3cf1ffcc790864db631f50a02da123, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -2.73
|
||||
value: -3.065
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1.28
|
||||
value: 0.076
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
@ -439,6 +459,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: 1. Cube
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3388591762507178167, guid: 7702b7919503a1e479151e8fecd78924, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8604408698177003535, guid: 7702b7919503a1e479151e8fecd78924, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -5.78641
|
||||
@ -537,6 +561,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: 7. Girl
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6156076713058116187, guid: b268c439fa90d6542ab0c876cd677661, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@ -554,6 +582,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: 2. Electro
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 216986101277937167, guid: 53736a6cd29210e4eb0f110ef04d344c, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8312733962015895203, guid: 53736a6cd29210e4eb0f110ef04d344c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -4.17
|
||||
@ -651,6 +683,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: 5. Feeshka
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5358438370345097688, guid: f1fc145bd1885e146bc33b2669940862, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
|
||||
@ -148,6 +148,32 @@ public class SoundManager : MonoBehaviour
|
||||
// Возвращаем в пул через время клипа
|
||||
StartCoroutine(ReturnToPool(effect, clipToPlay.length));
|
||||
}
|
||||
|
||||
public void playClip(AudioClip clip, float volume)
|
||||
{
|
||||
if (clip == null)
|
||||
{
|
||||
Debug.LogWarning("Не установлен звук");
|
||||
return;
|
||||
}
|
||||
GameObject effect = GetPooledAudioObject();
|
||||
AudioSource audioSource = effect.GetComponent<AudioSource>();
|
||||
|
||||
//AudioClip clipToPlay = GameManager.instance.currentPlayer == CellState.Player1 ? down1 : down2;
|
||||
AudioClip clipToPlay = clip;
|
||||
|
||||
|
||||
|
||||
audioSource.clip = clipToPlay;
|
||||
audioSource.pitch = 1;
|
||||
audioSource.volume = effectsVolume * volume;
|
||||
|
||||
effect.SetActive(true);
|
||||
audioSource.Play();
|
||||
|
||||
// Возвращаем в пул через время клипа
|
||||
StartCoroutine(ReturnToPool(effect, clipToPlay.length));
|
||||
}
|
||||
public void playDropDown()
|
||||
{
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user