void OnTriggerEnter(Collider collider) { if (collider.tag == "DangerZone") { var rot = gameObject.transform.rotation.eulerAngles; Debug.Log(Mathf.Rad2Deg * rot.x + " " + rot.z); if ((rot.x < 270 && rot.x > 90) || (rot.z < 270 && rot.z > 90)) { if (!playOnce) { playOnce = true; source.Stop(); dangerzone.Play(); sga.ShowMessage("DANGER ZONE!"); } } } }
void sendMeme() { timer = Random.Range(memeMinInterval, memeMaxInterval); sga.ShowMessage(memes[Random.Range(0, memes.Count - 1)]); }