Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
pinsonc committed Dec 8, 2019
1 parent 31a4bb4 commit da3c975
Show file tree
Hide file tree
Showing 20 changed files with 90,801 additions and 1,489 deletions.
22 changes: 15 additions & 7 deletions Assets/CrumpledNote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,30 @@
public class CrumpledNote : MonoBehaviour
{
public Text myText;
private bool hasBeenGrabbed = false;
public bool enter = true;
// Start is called before the first frame update
void Start()
{
myText = myText.GetComponent<Text>();
}

// Update is called once per frame
void onTriggerEnter(Collider other)
private void OnTriggerStay(Collider other)
{
if (other.gameObject.tag == "Paper")

Debug.Log("In OnTriggerEnter");
if (enter)
{
myText.text = "Dr. Jekyll presents his compliments to Messrs. Maw. " +
"He assures them that their last sample is impure and quite useless for his present purpose. " +
"In the year 18—, Dr. J. purchased a somewhat large quantity from Messrs. M. He now begs them " +
"to search with most sedulous care, and should any of the same quality be left, forward it to him " +
"at once. Expense is no consideration. The importance of this to Dr. J. can hardly be exaggerated.";
if (!hasBeenGrabbed)
{
hasBeenGrabbed = true;
myText.text = "Dr. Jekyll presents his compliments to Messrs. Maw. " +
"He assures them that their last sample is impure and quite useless for his present purpose. " +
"In the year 18—, Dr. J. purchased a somewhat large quantity from Messrs. M. He now begs them " +
"to search with most sedulous care, and should any of the same quality be left, forward it to him " +
"at once. Expense is no consideration. The importance of this to Dr. J. can hardly be exaggerated.";
}
}
}
}
54 changes: 26 additions & 28 deletions Assets/LevelSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public class LevelSwitch : MonoBehaviour
public string[] levelNames = new string[5] { "street", "House interior", "courtyard_scene", "Surgical Theater", "Lab New" };
public static int[] count = {0, 0, 0, 0, 0 };
public static bool[] finish = {false, false, false, false, false };

// Start is called before the first frame update
void Start()
{
Expand All @@ -24,10 +23,12 @@ void Start()
{
startPos = new Vector3(entrance.transform.position.x, 1.0f, entrance.transform.position.z);
player.transform.rotation = GameObject.FindWithTag("DoorEnter").transform.rotation;
player.transform.Rotate(player.transform.rotation.x, -1 * player.transform.rotation.y, player.transform.rotation.z);
} else
{
startPos = new Vector3(exit.transform.position.x, 1.0f, exit.transform.position.z);
player.transform.rotation = GameObject.FindWithTag("DoorExit").transform.rotation;
player.transform.Rotate(player.transform.rotation.x, -1 * player.transform.rotation.y, player.transform.rotation.z);
}
player.transform.position = startPos;
print(startPos);
Expand All @@ -36,35 +37,32 @@ void Start()
// Update is called once per frame
void Update()
{

if (gameObject.GetComponent<OVRGrabber>().grabbedObject != null)
print(gameObject.GetComponent<OVRGrabber>().grabbedObject);
if (gameObject.GetComponent<OVRGrabber>().grabbedObject != null)
{
print(gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject);
Debug.Log("Grabbed something");
if (gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag == "DoorEnter")
{
print(gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject);
Debug.Log(finish[curLevel]);
if (gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag == "DoorEnter")
{
Debug.Log(gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag);
Debug.Log(curLevel);
curLevel--;
Debug.Log(curLevel);

entering = false;
print(entering);
SteamVR_LoadLevel.Begin(levelNames[curLevel]);
}
else if (gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag == "DoorExit")
{
Debug.Log(gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag);
Debug.Log(curLevel);
curLevel++;
Debug.Log(curLevel);
entering = true;
Debug.Log(gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag);
Debug.Log(curLevel);
curLevel--;
Debug.Log(curLevel);

entering = false;
print(entering);
SteamVR_LoadLevel.Begin(levelNames[curLevel]);
}
SteamVR_LoadLevel.Begin(levelNames[curLevel]);
}



else if (gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag == "DoorExit")
{
Debug.Log(gameObject.GetComponent<OVRGrabber>().grabbedObject.gameObject.tag);
Debug.Log(curLevel);
curLevel++;
Debug.Log(curLevel);
entering = true;
print(entering);
SteamVR_LoadLevel.Begin(levelNames[curLevel]);
}
}
}
}
77 changes: 77 additions & 0 deletions Assets/Materials/New Material.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Material
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.05660379, g: 0.0018689941, b: 0.0018689941, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
8 changes: 8 additions & 0 deletions Assets/Materials/New Material.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions Assets/New Material 1.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Material 1
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
8 changes: 8 additions & 0 deletions Assets/New Material 1.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit da3c975

Please sign in to comment.