death sounds added.
This commit is contained in:
parent
edc3c3736c
commit
ee6f44b22b
4 changed files with 134 additions and 7 deletions
|
|
@ -160,6 +160,8 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
characterSprite: {fileID: 21200000}
|
||||
demonDeath: {fileID: 8300000, guid: 510757768cf12453587e7098af49b584, type: 3}
|
||||
patronDeath: {fileID: 8300000, guid: d67f8f47c42e54a8482fe86b8c35533e, type: 3}
|
||||
--- !u!114 &11400002
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ GameObject:
|
|||
- 54: {fileID: 5400000}
|
||||
- 136: {fileID: 13600000}
|
||||
- 114: {fileID: 11400002}
|
||||
- 82: {fileID: 8200000}
|
||||
m_Layer: 0
|
||||
m_Name: PatronFatty
|
||||
m_TagString: Untagged
|
||||
|
|
@ -75,6 +76,64 @@ Rigidbody:
|
|||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!82 &8200000
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_audioClip: {fileID: 8300000, guid: d67f8f47c42e54a8482fe86b8c35533e, type: 3}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
--- !u!95 &9500000
|
||||
Animator:
|
||||
serializedVersion: 2
|
||||
|
|
@ -113,6 +172,8 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
characterSprite: {fileID: 21200000}
|
||||
demonDeath: {fileID: 8300000, guid: 510757768cf12453587e7098af49b584, type: 3}
|
||||
patronDeath: {fileID: 8300000, guid: d67f8f47c42e54a8482fe86b8c35533e, type: 3}
|
||||
--- !u!136 &13600000
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ GameObject:
|
|||
- 54: {fileID: 5400000}
|
||||
- 136: {fileID: 13600000}
|
||||
- 114: {fileID: 11400000}
|
||||
- 82: {fileID: 8200000}
|
||||
m_Layer: 0
|
||||
m_Name: PatronTits
|
||||
m_TagString: Untagged
|
||||
|
|
@ -75,6 +76,64 @@ Rigidbody:
|
|||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!82 &8200000
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_audioClip: {fileID: 8300000, guid: d67f8f47c42e54a8482fe86b8c35533e, type: 3}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
--- !u!95 &9500000
|
||||
Animator:
|
||||
serializedVersion: 2
|
||||
|
|
@ -101,6 +160,8 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
characterSprite: {fileID: 21200000}
|
||||
demonDeath: {fileID: 8300000, guid: 510757768cf12453587e7098af49b584, type: 3}
|
||||
patronDeath: {fileID: 8300000, guid: d67f8f47c42e54a8482fe86b8c35533e, type: 3}
|
||||
--- !u!114 &11400002
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ using System.Collections;
|
|||
|
||||
public class Patron : MonoBehaviour {
|
||||
public Renderer characterSprite;
|
||||
public AudioClip demonDeath;
|
||||
public AudioClip patronDeath;
|
||||
|
||||
private GameController gameController;
|
||||
private bool isDemon = false;
|
||||
|
|
@ -23,15 +25,16 @@ public class Patron : MonoBehaviour {
|
|||
//Instantiate(explosion, transform.position, transform.rotation);
|
||||
if (other.tag == "Shank")
|
||||
{
|
||||
//Instantiate (playerExplosion, other.transform.position, other.transform.rotation);
|
||||
//gameObject.audio.Play ();
|
||||
Destroy(gameObject);
|
||||
|
||||
|
||||
if(isDemon)
|
||||
if(isDemon) {
|
||||
AudioSource.PlayClipAtPoint (demonDeath, gameObject.rigidbody.position);
|
||||
gameController.AddScore ();
|
||||
else
|
||||
}
|
||||
else {
|
||||
AudioSource.PlayClipAtPoint (patronDeath, gameObject.rigidbody.position);
|
||||
gameController.DetractScore ();
|
||||
}
|
||||
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
if (other.tag == "VVAura" && isDemon) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue