death sounds added.
This commit is contained in:
parent
edc3c3736c
commit
ee6f44b22b
4 changed files with 134 additions and 7 deletions
|
|
@ -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