diff --git a/Assets/Evil Material.mat b/Assets/Evil Material.mat new file mode 100644 index 0000000..a1a365b --- /dev/null +++ b/Assets/Evil Material.mat @@ -0,0 +1,28 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Evil Material + m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: {} + m_Colors: + data: + first: + name: _Color + second: {r: 1, g: 0, b: 0, a: 1} diff --git a/Assets/Evil Material.mat.meta b/Assets/Evil Material.mat.meta new file mode 100644 index 0000000..2c9a185 --- /dev/null +++ b/Assets/Evil Material.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: f259c2b0e77aaec4da868f7cc2a94f99 +NativeFormatImporter: + userData: diff --git a/Assets/Neutral Material.mat b/Assets/Neutral Material.mat new file mode 100644 index 0000000..d815e8d --- /dev/null +++ b/Assets/Neutral Material.mat @@ -0,0 +1,28 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Neutral Material + m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: {} + m_Colors: + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Neutral Material.mat.meta b/Assets/Neutral Material.mat.meta new file mode 100644 index 0000000..21d238a --- /dev/null +++ b/Assets/Neutral Material.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: cf27db5b36385ff4eb67c47fd9d428f9 +NativeFormatImporter: + userData: diff --git a/Assets/Prefabs/AuraMaterial.mat b/Assets/Prefabs/AuraMaterial.mat new file mode 100644 index 0000000..7a74907 --- /dev/null +++ b/Assets/Prefabs/AuraMaterial.mat @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: AuraMaterial + m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Detail + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Illum + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _Cutoff + second: .5 + data: + first: + name: _Shininess + second: .078125 + data: + first: + name: _InvFade + second: 2.51946425 + data: + first: + name: _EmissionLM + second: 0 + m_Colors: + data: + first: + name: _Color + second: {r: .167603806, g: .88097173, b: .911764681, a: 1} + data: + first: + name: _SpecColor + second: {r: .5, g: .5, b: .5, a: 1} + data: + first: + name: _TintColor + second: {r: .5, g: .5, b: .5, a: .5} diff --git a/Assets/Prefabs/AuraMaterial.mat.meta b/Assets/Prefabs/AuraMaterial.mat.meta new file mode 100644 index 0000000..a737c18 --- /dev/null +++ b/Assets/Prefabs/AuraMaterial.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d1688b410ece4b64db62724e40ff91d1 +NativeFormatImporter: + userData: diff --git a/Assets/Prefabs/VV Aura.prefab b/Assets/Prefabs/VV Aura.prefab new file mode 100644 index 0000000..07f492b --- /dev/null +++ b/Assets/Prefabs/VV Aura.prefab @@ -0,0 +1,97 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + - 33: {fileID: 3300000} + - 136: {fileID: 13600000} + - 23: {fileID: 2300000} + - 114: {fileID: 11400000} + m_Layer: 0 + m_Name: VV Aura + m_TagString: VVAura + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 15, y: 1, z: 15} + m_Children: [] + m_Father: {fileID: 0} +--- !u!23 &2300000 +Renderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_LightmapIndex: 255 + m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} + m_Materials: + - {fileID: 2100000, guid: d1688b410ece4b64db62724e40ff91d1, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_LightProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_SortingLayerID: 0 +--- !u!33 &3300000 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 025a712113e797c408ae9865e9ac79c6, type: 3} + m_Name: + m_EditorClassIdentifier: + length: 2 +--- !u!136 &13600000 +CapsuleCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + m_Radius: .5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/Assets/Prefabs/VV Aura.prefab.meta b/Assets/Prefabs/VV Aura.prefab.meta new file mode 100644 index 0000000..92d018f --- /dev/null +++ b/Assets/Prefabs/VV Aura.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 54b915706f095a04ebcad7cd6fe3550c +NativeFormatImporter: + userData: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 10da81f..da1f2e8 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -216,7 +216,7 @@ Renderer: m_LightmapIndex: 255 m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} m_Materials: - - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: cf27db5b36385ff4eb67c47fd9d428f9, type: 2} m_SubsetIndices: m_StaticBatchRoot: {fileID: 0} m_UseLightProbes: 0 @@ -285,6 +285,8 @@ MonoBehaviour: - {fileID: 582022781} - {fileID: 973833183} currentDestIndex: 0 + evilMat: {fileID: 2100000, guid: f259c2b0e77aaec4da868f7cc2a94f99, type: 2} + neutralMat: {fileID: 2100000, guid: cf27db5b36385ff4eb67c47fd9d428f9, type: 2} --- !u!195 &134611203 NavMeshAgent: m_ObjectHideFlags: 0 @@ -348,10 +350,12 @@ MonoBehaviour: m_EditorClassIdentifier: speed: 10 nextFire: 1 - fireRate: 1 + delay: 1 shank: {fileID: 100000, guid: 0dd5d3e41887306468e6f9dd9d58b975, type: 2} playerAngle: {fileID: 745975992} shankSpawn: {fileID: 57666823} + vvAura: {fileID: 100000, guid: 54b915706f095a04ebcad7cd6fe3550c, type: 2} + swigCounter: 2 --- !u!54 &146718574 Rigidbody: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/GotStabbed.cs b/Assets/Scripts/GotStabbed.cs deleted file mode 100644 index 0127258..0000000 --- a/Assets/Scripts/GotStabbed.cs +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a66d34b..0000000 --- a/Assets/Scripts/GotStabbed.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 554abc2..3aac664 100644 --- a/Assets/Scripts/Patron.cs +++ b/Assets/Scripts/Patron.cs @@ -5,6 +5,8 @@ public class Patron : MonoBehaviour { public GameObject[] destinations; public int currentDestIndex = 0; + public Material evilMat; + public Material neutralMat; private NavMeshAgent nva; @@ -31,6 +33,10 @@ public class Patron : MonoBehaviour { //Instantiate (playerExplosion, other.transform.position, other.transform.rotation); Destroy(gameObject); } + + if (other.tag == "VVAura") { + renderer.material = evilMat; + } // gameController.AddScore (scoreValue); // diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index e99b88c..66d6e0b 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -5,18 +5,29 @@ public class PlayerController : MonoBehaviour { public float speed = 10; public float nextFire; - public float fireRate; + public float delay; public GameObject shank; public Transform playerAngle; public Transform shankSpawn; + public GameObject vvAura; + public int swigCounter; void Update() { + int swigs = 0; + if (Input.GetButton("Fire1") && Time.time > nextFire) { - nextFire = Time.time + fireRate; + nextFire = Time.time + delay; Instantiate(shank, shankSpawn.position, playerAngle.rotation); } + + if (Input.GetButton("ActivateVV") && swigs <= swigCounter && Time.time > nextFire) + { + nextFire = Time.time + delay * 2; + Instantiate (vvAura, rigidbody.position, rigidbody.rotation); + swigs++; + } } void FixedUpdate() { diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index be9e61b..5255e3f 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -228,3 +228,19 @@ InputManager: type: 0 axis: 0 joyNum: 0 + - serializedVersion: 3 + m_Name: ActivateVV + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: e + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: .00100000005 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 446ec34..92ede53 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -5,6 +5,7 @@ TagManager: tags: - Shank - Demon + - VVAura - Builtin Layer 0: Default Builtin Layer 1: TransparentFX