Commit 44344a15 authored by Nathan De Castro's avatar Nathan De Castro

Added colors, testing pitch detection, dynamic enableing

parent bcfcecc2
......@@ -50,8 +50,12 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Scripts\AI\AI.cs" />
<Compile Include="Assets\Scripts\Effects\CurrentPlayer.cs" />
<Compile Include="Assets\Scripts\AI\CurrentPlayer.cs" />
<Compile Include="Assets\Scripts\Effects\BigEnabler.cs" />
<Compile Include="Assets\Scripts\Effects\MediumEnabler.cs" />
<Compile Include="Assets\Scripts\Effects\Rotator.cs" />
<Compile Include="Assets\Scripts\Effects\SmallEnabler.cs" />
<Compile Include="Assets\Scripts\Effects\SwitchState.cs" />
<Compile Include="Assets\Scripts\Tools\AudioManager.cs" />
<Compile Include="Assets\Scripts\Tools\FPS_Camera.cs" />
<Compile Include="Assets\Scripts\Tools\FPS_Control.cs" />
......@@ -66,6 +70,7 @@
<Compile Include="Assets\Scripts\UI\PickupText.cs" />
<Compile Include="Assets\Scripts\UI\RestartText.cs" />
<Compile Include="Assets\Scripts\UI\Status.cs" />
<Compile Include="Assets\Scripts\UI\Visibility.cs" />
<Compile Include="Assets\SteamVR\Extras\SteamVR_GazeTracker.cs" />
<Compile Include="Assets\SteamVR\Extras\SteamVR_LaserPointer.cs" />
<Compile Include="Assets\SteamVR\Extras\SteamVR_Teleporter.cs" />
......
......@@ -7,9 +7,9 @@ Material:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Coin
m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_LightmapFlags: 0
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
......@@ -69,6 +69,12 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _SpecGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _BumpScale
......@@ -121,7 +127,10 @@ Material:
m_Colors:
- first:
name: _Color
second: {r: 0.74264705, g: 0.66069984, b: 0, a: 0}
second: {r: 0, g: 0, b: 0, a: 1}
- first:
name: _EmissionColor
second: {r: 0.3118154, g: 0.31617647, b: 0, a: 1}
second: {r: 7.454077, g: 8.64673, b: 0, a: 1}
- first:
name: _SpecColor
second: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
......@@ -6,13 +6,12 @@ Material:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Exclamation
m_Name: Switch
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
......@@ -82,7 +81,7 @@ Material:
second: 1
- first:
name: _DstBlend
second: 10
second: 0
- first:
name: _GlossMapScale
second: 1
......@@ -97,7 +96,7 @@ Material:
second: 0
- first:
name: _Mode
second: 3
second: 0
- first:
name: _OcclusionStrength
second: 1
......@@ -118,11 +117,11 @@ Material:
second: 0
- first:
name: _ZWrite
second: 0
second: 1
m_Colors:
- first:
name: _Color
second: {r: 0.9191176, g: 0.03379107, b: 0.03379107, a: 1}
- first:
name: _EmissionColor
second: {r: 0.802, g: 0.047176465, b: 0.047176465, a: 1}
second: {r: 0, g: 0, b: 0, a: 1}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !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: 1876634338105552}
m_IsPrefabParent: 1
--- !u!1 &1331159844058258
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4575044873899302}
- component: {fileID: 108319925751109520}
m_Layer: 0
m_Name: Point light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1481948352735598
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4848804580108880}
- component: {fileID: 33004304096210296}
- component: {fileID: 65918153576117598}
- component: {fileID: 23130145737338240}
m_Layer: 0
m_Name: SwitchOn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 0
--- !u!1 &1703193573254748
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4244690630902324}
- component: {fileID: 33153890112296730}
- component: {fileID: 65632341659399534}
- component: {fileID: 23194167621710554}
m_Layer: 0
m_Name: Back
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1863224024797604
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4169507316784948}
- component: {fileID: 33542989444720924}
- component: {fileID: 65929630249801862}
- component: {fileID: 23559752972859314}
m_Layer: 0
m_Name: SwitchOff
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!1 &1876634338105552
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4890147420870624}
- component: {fileID: 114849189908832936}
m_Layer: 0
m_Name: Switch
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4169507316784948
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1863224024797604}
m_LocalRotation: {x: -0, y: -0, z: -0.28599554, w: 0.95823103}
m_LocalPosition: {x: 0.448, y: 0.1, z: 0}
m_LocalScale: {x: 0.095673114, y: 0.38636065, z: 0.1991099}
m_Children: []
m_Father: {fileID: 4890147420870624}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -33.237003}
--- !u!4 &4244690630902324
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1703193573254748}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.346, y: 0, z: 0}
m_LocalScale: {x: 0.25213462, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4890147420870624}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4575044873899302
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1331159844058258}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.66, y: 0.164, z: 0.213}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4890147420870624}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4848804580108880
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1481948352735598}
m_LocalRotation: {x: -0, y: -0, z: -0.93431824, w: 0.3564402}
m_LocalPosition: {x: 0.448, y: 0.099999584, z: 0}
m_LocalScale: {x: 0.09566775, y: 0.38636127, z: 0.19911465}
m_Children: []
m_Father: {fileID: 4890147420870624}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -138.23601}
--- !u!4 &4890147420870624
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1876634338105552}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -15.51, y: 4.512, z: -12.905}
m_LocalScale: {x: 0.5392623, y: 0.5392622, z: 0.21570486}
m_Children:
- {fileID: 4244690630902324}
- {fileID: 4169507316784948}
- {fileID: 4848804580108880}
- {fileID: 4575044873899302}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23130145737338240
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1481948352735598}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: f23f26c6f94bcd045a53e2c6228362dc, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!23 &23194167621710554
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1703193573254748}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: cbb4be9297ad99a4d9465d5861dfd4b7, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!23 &23559752972859314
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1863224024797604}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: f23f26c6f94bcd045a53e2c6228362dc, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &33004304096210296
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1481948352735598}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33153890112296730
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1703193573254748}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33542989444720924
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1863224024797604}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &65632341659399534
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1703193573254748}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!65 &65918153576117598
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1481948352735598}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!65 &65929630249801862
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1863224024797604}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!108 &108319925751109520
Light:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1331159844058258}
m_Enabled: 1
serializedVersion: 7
m_Type: 2
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_Intensity: 4.22
m_Range: 0.59
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!114 &114849189908832936
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1876634338105552}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70d3447759e9d63479797beb15dbf4fd, type: 3}
m_Name:
m_EditorClassIdentifier:
main_light: {fileID: 0}
switch_on: {fileID: 1481948352735598}
switch_off: {fileID: 1863224024797604}
fileFormatVersion: 2
guid: 97e634f2d7c5fd44b945eccdb578e60a
timeCreated: 1489666582
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
......@@ -51,7 +51,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1000010081106018}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 62.52, y: 3.85, z: 28.31}
m_LocalPosition: {x: 24.5, y: 3.687, z: 13.8}
m_LocalScale: {x: 0.5357632, y: 0.53576386, z: 0.53576386}
m_Children: []
m_Father: {fileID: 4000013667792572}
......
......@@ -46,7 +46,7 @@ public class AI : MonoBehaviour {
}
void FixedUpdate () {
ray_magnitude = AudioManager.instance.GetLightRange() / ghost_awarness;
ray_magnitude = AudioManager.instance.GetLightAngle() / ghost_awarness;
if (GameSettings.instance.lose_state == false && GameSettings.instance.win_state == false) //IF you die, these won't be called anymore.
{
state_manager (); //Manages the AI's different states
......
using UnityEngine;
//Another singleton that stores all player relevant information.
public class CurrentPlayer : MonoBehaviour
{
public class CurrentPlayer : MonoBehaviour {
public static CurrentPlayer instance;
public GameObject player;
public bool walking = false;
void Awake()
{
void Awake () {
instance = this;
print("PlayerSettings initialized");
// print("PlayerSettings initialized");
player = this.gameObject;
}
void Start()
{
void Start () {
}
void Update()
{
void Update () {
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 5ae009a233e5930428d03c07d819d7c8
timeCreated: 1486901373
guid: 502dc647dd3b62745b69ffe781c937ed
timeCreated: 1489764984
licenseType: Free
MonoImporter:
serializedVersion: 2
......
using UnityEngine;
// A simple rotating script for the walls of the player area
public class BigEnabler : MonoBehaviour {
public bool Activated = false;
Renderer[] rendererComponents;
void Start () {
rendererComponents = GetComponentsInChildren<Renderer> ();
}
// Update is called once per frame
void Update () {
if (AudioManager.instance.GetPitchValue () == 1) {
Activated = true;
} else {
Activated = false;
}
foreach (Renderer component in rendererComponents) {
component.enabled = Activated;
}