Merge Sound

dev-ali
Ali Sharoz 2 days ago
parent 9032bcde66
commit 0313f97ec9

@ -45366,6 +45366,134 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 503197847}
m_Mesh: {fileID: 286828231156080013, guid: 3e843a0c227f8b94b9431a18b62cb663, type: 3}
--- !u!1 &503521022
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 503521024}
- component: {fileID: 503521023}
m_Layer: 0
m_Name: MergePlayerSound
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!82 &503521023
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 503521022}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 2430f9970f7793b41b15b4928fe756b6, 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
--- !u!4 &503521024
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 503521022}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -14.628285, y: 1.8404062, z: 4.543242}
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 &503572468
GameObject:
m_ObjectHideFlags: 0
@ -118275,88 +118403,6 @@ Transform:
- {fileID: 136824889}
m_Father: {fileID: 1151035127}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1342454347
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 8583770408142850957}
m_Modifications:
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalPosition.y
value: -2.5
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 873183754724297478, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_Name
value: 2 Mysto
objectReference: {fileID: 0}
- target: {fileID: 873183754724297478, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2116965600322173463, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_Shadows.m_Type
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5344633537846803137, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5344633537846803137, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6678435102177337540, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
--- !u!4 &1342454348 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 873183754724297473, guid: bdc203e2aefbe054d88fbc005e7e2628, type: 3}
m_PrefabInstance: {fileID: 1342454347}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1342664451
GameObject:
m_ObjectHideFlags: 0
@ -190604,6 +190650,10 @@ PrefabInstance:
propertyPath: m_Name
value: Squad
objectReference: {fileID: 0}
- target: {fileID: 8583770407788507631, guid: a0a15effcaf7f2f4bbfd493b6593fdcb, type: 3}
propertyPath: MergeAudioSource
value:
objectReference: {fileID: 503521023}
- target: {fileID: 8583770407788507631, guid: a0a15effcaf7f2f4bbfd493b6593fdcb, type: 3}
propertyPath: cinemachineTargetGroup
value:
@ -190675,17 +190725,9 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects:
- {fileID: 6707071687464432220, guid: a0a15effcaf7f2f4bbfd493b6593fdcb, type: 3}
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 8583770407788507624, guid: a0a15effcaf7f2f4bbfd493b6593fdcb, type: 3}
insertIndex: -1
addedObject: {fileID: 1342454348}
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a0a15effcaf7f2f4bbfd493b6593fdcb, type: 3}
--- !u!4 &8583770408142850957 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8583770407788507624, guid: a0a15effcaf7f2f4bbfd493b6593fdcb, type: 3}
m_PrefabInstance: {fileID: 8583770408142850956}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8828233118980391471
PrefabInstance:
m_ObjectHideFlags: 0
@ -190768,3 +190810,4 @@ SceneRoots:
- {fileID: 1688528664}
- {fileID: 1790654131}
- {fileID: 1414093249}
- {fileID: 503521024}

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 2430f9970f7793b41b15b4928fe756b6
AudioImporter:
externalObjects: {}
serializedVersion: 7
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:

@ -46,6 +46,7 @@ public class NeutralMember : Unit
private void AddNeutralToSquad()
{
_squad.AddMember(Get<SquadMember>());
gameObject.SetLayerRecursively(playerLayer.ToLayer());

@ -10,6 +10,7 @@ using static D2D.Utilities.CommonGameplayFacade;
public class SquadComponent : GameStateMachineUser
{
public AudioSource MergeAudioSource;
[Header("Squad Settings")]
[SerializeField] private List<SquadMember> squadMembers;
[SerializeField] private float _speed = 5f;
@ -97,7 +98,7 @@ public class SquadComponent : GameStateMachineUser
{
member.Init();
squadMembers.Add(member);
MergeAudioSource.Play();
var squadMembersCount = squadMembers.Count;
_formation.RecreateFormation(squadMembers[0].transform.position, squadMembersCount <= 4 ? _formationRadius - .3f : _formationRadius, squadMembersCount - 1);
member.health.Died += () => MemberDie(member);

Loading…
Cancel
Save