diff --git a/Main/HitCheck.cs b/Main/HitCheck.cs index da3e759..f6221b3 100644 --- a/Main/HitCheck.cs +++ b/Main/HitCheck.cs @@ -1,5 +1,3 @@ -using Photon.Voice; -using System.Runtime.CompilerServices; using UnityEngine; using UnityEngine.SceneManagement; @@ -19,27 +17,33 @@ public class HitCheck : MonoBehaviour public string ScreamObjectTag = "ScreamObject"; public string SaveZoneTag = "SaveZone"; + [Header("Options")] + public bool enable_kick; + public bool enable_pvp; + public bool enable_freeze; + public bool enable_screams; + public bool enable_tag; + [Header("Other")] public int tag_counter; public GameObject scream; public float time_of_scream; - public bool is_enemy; private void OnTriggerEnter(Collider other) { - if (other.CompareTag(kickTag) && !is_enemy) + if (other.CompareTag(kickTag) && enable_kick) { Application.Quit(); Debug.Log("Kick"); } - if (other.CompareTag(pushTag)) + if (other.CompareTag(pushTag) && enable_pvp) { gameObject.transform.parent.GetComponent().velocity += other.gameObject.GetComponent().force; gameObject.transform.parent.GetComponent().velocity *= other.gameObject.GetComponent().force_multiplyer; gameObject.transform.parent.GetComponent().velocity += (other.transform.position - transform.position).normalized * other.gameObject.GetComponent().force_to_the_player; Debug.Log("Boom"); } - if (other.CompareTag(HandTag)) + if (other.CompareTag(HandTag) && enable_tag) { tag_counter++; Debug.Log("Tagged"); @@ -50,7 +54,7 @@ private void OnTriggerEnter(Collider other) Death(); } - if (other.CompareTag(FreezeTag)) + if (other.CompareTag(FreezeTag) && enable_freeze) { transform.parent.GetComponent().drag = 100; transform.parent.GetComponent().angularDrag = 100;