Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 46 additions & 43 deletions Horror-Royale/Assembly-CSharp-Editor.csproj

Large diffs are not rendered by default.

77 changes: 37 additions & 40 deletions Horror-Royale/Assembly-CSharp.csproj

Large diffs are not rendered by default.

Binary file not shown.
24 changes: 24 additions & 0 deletions Horror-Royale/Assets/Main/Resources/Audio/scream.wav.meta

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

2 changes: 2 additions & 0 deletions Horror-Royale/Assets/Main/Scripts/OnCollisionEnter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class OnCollisionEnter : MonoBehaviour {

bool scaryFace = false;
public GameObject jumpImage;
public AudioSource scream;

private float jumpX, jumpY = 3f;
private bool jumpRotate = true;
Expand All @@ -33,6 +34,7 @@ void OnTriggerEnter(Collider col){
if (col.name == "Player") {
//Debug.Log ("MONSTER MONSTER");
GameObject.Find ("Player").GetComponent<FirstPersonController> ().enabled = false;
scream.Play ();
StartCoroutine (ScaryFace());
}
}
Expand Down
32 changes: 16 additions & 16 deletions Horror-Royale/Assets/Main/Scripts/PlayerPickUp.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerPickUp : MonoBehaviour {

public Inventory inventory;

private void OnTriggerEnter(Collider other){
InteractableItemBaseClass item = other.GetComponent<InteractableItemBaseClass> (); //sets var item into object player ran into
Debug.Log("hit!");
if (item != null) {
inventory.AddItem (item as ItemBaseClass); // adds item into inventory
}
}
}
//using System.Collections;
//using System.Collections.Generic;
//using UnityEngine;
//
//public class PlayerPickUp : MonoBehaviour {
//
// public Inventory inventory;
//
// private void OnTriggerEnter(Collider other){
// InteractableItemBaseClass item = other.GetComponent<InteractableItemBaseClass> (); //sets var item into object player ran into
// Debug.Log("hit!");
// if (item != null) {
// inventory.AddItem (item as ItemBaseClass); // adds item into inventory
// }
// }
//}
28 changes: 28 additions & 0 deletions Horror-Royale/Assets/Main/Scripts/Raycast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class Raycast : MonoBehaviour {
public float clickRange = 1f;
private float nextFire;

public Inventory inventory;

GameObject weapon_1;

Expand Down Expand Up @@ -43,6 +44,18 @@ void Update () {
addPage (2);
print ("Found 2nd clue!");
}
else if (hit.collider.gameObject.name == "Clue_3") {
addPage (3);
print ("Found 3rd clue!");
}
else if (hit.collider.gameObject.name == "Clue_4") {
addPage (4);
print ("Found 4th clue!");
}
else if (hit.collider.gameObject.name == "Clue_5") {
addPage (5);
print ("Found 5th clue!");
}
else if (hit.collider.gameObject.tag == "weapon1") {
weapon_1.SetActive (false);
GameObject.Find("weapon_1_attached").GetComponent<MeshRenderer> ().enabled = true;
Expand All @@ -51,6 +64,12 @@ void Update () {
else {
theDistance = hit.distance;
print (theDistance + " " + hit.collider.gameObject.name);

InteractableItemBaseClass item = hit.collider.GetComponent<InteractableItemBaseClass> (); //sets var item into object player ran into
Debug.Log("hit!");
if (item != null) {
inventory.AddItem (item as ItemBaseClass); // adds item into inventory
}
}
}
}
Expand All @@ -63,18 +82,27 @@ private void addPage(int clueNum){
switch (clueNum) {
case(1):
Journal.clue1Found = true;
GameObject.Find ("Clue_1").SetActive (false);
break;
case(2):
Journal.clue2Found = true;
GameObject.Find ("Clue_2").SetActive (false);

break;
case(3):
Journal.clue3Found = true;
GameObject.Find ("Clue_3").SetActive (false);

break;
case(4):
Journal.clue4Found = true;
GameObject.Find ("Clue_4").SetActive (false);

break;
case(5):
Journal.clue5Found = true;
GameObject.Find ("Clue_5").SetActive (false);

break;
}
}
Expand Down
Loading