Added shanking mechanic to kill patron.
This commit is contained in:
parent
3bf37536fb
commit
04200df045
7 changed files with 45 additions and 19 deletions
15
Assets/Scripts/GotStabbed.cs
Normal file
15
Assets/Scripts/GotStabbed.cs
Normal 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 () {
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/GotStabbed.cs.meta
Normal file
8
Assets/Scripts/GotStabbed.cs.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2cd24e31979a5b84f813edbbbfa3d661
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue