From 04200df045401841024a28940dc30ef233364a06 Mon Sep 17 00:00:00 2001 From: shakurass Date: Sat, 26 Apr 2014 14:13:06 -0600 Subject: [PATCH] Added shanking mechanic to kill patron. --- Assets/Prefabs/Shanking Detector.prefab | 2 +- Assets/Scenes/Main.unity | 8 ++++---- Assets/Scripts/GotStabbed.cs | 15 +++++++++++++++ Assets/Scripts/GotStabbed.cs.meta | 8 ++++++++ Assets/Scripts/Patron.cs | 15 +++++++++++++++ ProjectSettings/QualitySettings.asset | 15 +-------------- ProjectSettings/TagManager.asset | 1 + 7 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 Assets/Scripts/GotStabbed.cs create mode 100644 Assets/Scripts/GotStabbed.cs.meta diff --git a/Assets/Prefabs/Shanking Detector.prefab b/Assets/Prefabs/Shanking Detector.prefab index 009c815..02c2a98 100644 --- a/Assets/Prefabs/Shanking Detector.prefab +++ b/Assets/Prefabs/Shanking Detector.prefab @@ -14,7 +14,7 @@ GameObject: - 114: {fileID: 11400000} m_Layer: 0 m_Name: Shanking Detector - m_TagString: Untagged + m_TagString: Shank m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index d51aca8..a4820d9 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -237,8 +237,8 @@ Transform: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 134611195} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -5.53722095, y: 9.75308609, z: 7.53864098} - m_LocalScale: {x: 2.19080043, y: 2.19080043, z: 2.19080043} + m_LocalPosition: {x: -5.53722095, y: 10.147995, z: 7.53864098} + m_LocalScale: {x: 2.19080043, y: 3.67920685, z: 2.19080043} m_Children: [] m_Father: {fileID: 704683992} --- !u!54 &134611201 @@ -1128,7 +1128,7 @@ Transform: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 972571120} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalPosition: {x: -5, y: 2, z: 5} m_LocalScale: {x: 1.5, y: 4, z: 1.5} m_Children: - {fileID: 47264523} @@ -2139,7 +2139,7 @@ Transform: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2004495480} m_LocalRotation: {x: .382683486, y: 0, z: 0, w: .923879564} - m_LocalPosition: {x: 0, y: 10, z: -7.5} + m_LocalPosition: {x: 0, y: 10, z: -10} m_LocalScale: {x: .75, y: .962499857, z: .962499976} m_Children: [] m_Father: {fileID: 0} diff --git a/Assets/Scripts/GotStabbed.cs b/Assets/Scripts/GotStabbed.cs new file mode 100644 index 0000000..0127258 --- /dev/null +++ b/Assets/Scripts/GotStabbed.cs @@ -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 () { + + } +} diff --git a/Assets/Scripts/GotStabbed.cs.meta b/Assets/Scripts/GotStabbed.cs.meta new file mode 100644 index 0000000..a66d34b --- /dev/null +++ b/Assets/Scripts/GotStabbed.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2cd24e31979a5b84f813edbbbfa3d661 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Scripts/Patron.cs b/Assets/Scripts/Patron.cs index ab4fb82..7feb490 100644 --- a/Assets/Scripts/Patron.cs +++ b/Assets/Scripts/Patron.cs @@ -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); + } } diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index cfd65fa..6d45e61 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -120,17 +120,4 @@ QualitySettings: maximumLODLevel: 0 particleRaycastBudget: 4096 excludedTargetPlatforms: [] - m_PerPlatformDefaultQuality: - Android: 2 - BlackBerry: 2 - FlashPlayer: 3 - GLES Emulation: 3 - PS3: 3 - Standalone: 3 - Tizen: 2 - WP8: 3 - Web: 3 - Wii: 3 - Windows Store Apps: 3 - XBOX360: 3 - iPhone: 2 + m_PerPlatformDefaultQuality: {} diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 6f86997..3b52c8f 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -3,6 +3,7 @@ --- !u!78 &1 TagManager: tags: + - Shank - Builtin Layer 0: Default Builtin Layer 1: TransparentFX