Update for Ship Sinking SFX Fix
This commit is contained in:
parent
8af6e6546c
commit
58f182241e
131
Unity-Files/Assets/Examples/Defender/Defender.unity
generated
131
Unity-Files/Assets/Examples/Defender/Defender.unity
generated
@ -3034,6 +3034,133 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
droppedItemAmount: 3
|
droppedItemAmount: 3
|
||||||
|
--- !u!1 &1004702649
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1004702650}
|
||||||
|
- component: {fileID: 1004702651}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: ShipSinking
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1004702650
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1004702649}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1780207600}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!82 &1004702651
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1004702649}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 8300000, guid: 50393e1fc45b0974b838b67fc552c2c9, type: 3}
|
||||||
|
m_PlayOnAwake: 0
|
||||||
|
m_Volume: 0.5
|
||||||
|
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 &1011785959
|
--- !u!1 &1011785959
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -3124,6 +3251,7 @@ MonoBehaviour:
|
|||||||
difficultyType: 1
|
difficultyType: 1
|
||||||
incrementDifficultyInSeconds: 30
|
incrementDifficultyInSeconds: 30
|
||||||
incrementAmountInSeconds: 30
|
incrementAmountInSeconds: 30
|
||||||
|
difficultyCap: 0.5
|
||||||
--- !u!1 &1019999843
|
--- !u!1 &1019999843
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -4615,7 +4743,8 @@ Transform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 1004702650}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
@ -16,7 +16,6 @@ GameObject:
|
|||||||
- component: {fileID: 114000011533140650}
|
- component: {fileID: 114000011533140650}
|
||||||
- component: {fileID: 114000012184921828}
|
- component: {fileID: 114000012184921828}
|
||||||
- component: {fileID: -7020474658778450613}
|
- component: {fileID: -7020474658778450613}
|
||||||
- component: {fileID: 2479314498866889406}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Enemy Ship
|
m_Name: Enemy Ship
|
||||||
m_TagString: Enemy
|
m_TagString: Enemy
|
||||||
@ -181,6 +180,7 @@ MonoBehaviour:
|
|||||||
deathEffect: {fileID: 1496494696399852, guid: e61802031429a4e2e8f547dbca07fe84,
|
deathEffect: {fileID: 1496494696399852, guid: e61802031429a4e2e8f547dbca07fe84,
|
||||||
type: 3}
|
type: 3}
|
||||||
shipWithPasties: {fileID: 21300000, guid: 1e6561e946c90b94895946b3cfb12f82, type: 3}
|
shipWithPasties: {fileID: 21300000, guid: 1e6561e946c90b94895946b3cfb12f82, type: 3}
|
||||||
|
shipSinking: {fileID: 0}
|
||||||
--- !u!114 &114000011533140650
|
--- !u!114 &114000011533140650
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -226,99 +226,3 @@ SortingGroup:
|
|||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: -5
|
m_SortingOrder: -5
|
||||||
--- !u!82 &2479314498866889406
|
|
||||||
AudioSource:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 105984}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 4
|
|
||||||
OutputAudioMixerGroup: {fileID: 0}
|
|
||||||
m_audioClip: {fileID: 8300000, guid: 50393e1fc45b0974b838b67fc552c2c9, type: 3}
|
|
||||||
m_PlayOnAwake: 0
|
|
||||||
m_Volume: 0.5
|
|
||||||
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
|
|
||||||
|
@ -15,8 +15,9 @@ public class EnemyReturn : Physics2DObject
|
|||||||
public GameObject droppedObject;
|
public GameObject droppedObject;
|
||||||
[Header("Death Effect When Shot")]
|
[Header("Death Effect When Shot")]
|
||||||
public GameObject deathEffect;
|
public GameObject deathEffect;
|
||||||
//[Header("Has Droppable Object")]
|
|
||||||
public Sprite shipWithPasties;
|
public Sprite shipWithPasties;
|
||||||
|
public AudioSource shipSinking;
|
||||||
|
|
||||||
private bool hasDroppableObject = false;
|
private bool hasDroppableObject = false;
|
||||||
private bool isReturning = false;
|
private bool isReturning = false;
|
||||||
private Vector2 movement = new Vector2(0f, 0f);
|
private Vector2 movement = new Vector2(0f, 0f);
|
||||||
@ -85,7 +86,7 @@ public class EnemyReturn : Physics2DObject
|
|||||||
GameObject newDroppedObject = Instantiate<GameObject>(droppedObject);
|
GameObject newDroppedObject = Instantiate<GameObject>(droppedObject);
|
||||||
newDroppedObject.transform.position = new Vector2(this.transform.position.x, this.transform.position.y);
|
newDroppedObject.transform.position = new Vector2(this.transform.position.x, this.transform.position.y);
|
||||||
}
|
}
|
||||||
GetComponent<AudioSource>().Play();
|
GameObject.Find("ShipSinking").GetComponent<AudioSource>().Play();
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user