Added shanking mechanic to kill patron.

This commit is contained in:
shakurass 2014-04-26 14:13:06 -06:00
commit 04200df045
7 changed files with 45 additions and 19 deletions

View file

@ -0,0 +1,15 @@
using UnityEngine;
using System.Collections;
public class GotStabbed : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2cd24e31979a5b84f813edbbbfa3d661
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View file

@ -11,4 +11,19 @@ public class Patron : MonoBehaviour {
nva.SetDestination(pos);
nva.updateRotation = false;
}
void OnTriggerEnter(Collider other) {
//Instantiate(explosion, transform.position, transform.rotation);
if (other.tag == "Shank")
{
//Instantiate (playerExplosion, other.transform.position, other.transform.rotation);
Destroy(gameObject);
}
// gameController.AddScore (scoreValue);
//
// Destroy (other.gameObject);
// Destroy (gameObject);
}
}