void FixedUpdate() // and not Update { if (ctrl.ShakingHeadChecker(1, 45, 300, 0, 5, 0, 2)) { StopAllCoroutines(); StartCoroutine(resize()); } }
void Update() { if (ctrl.ShakingHeadChecker(1, 45, 300, 0, 5, 0, 2)) { foreach (var tmp in GameObject.FindObjectsOfType <CheckVisible>()) { tmp.SendMessage("reset"); } } }
void Update() { //This condition should be changed for the pattern detection if (vision.CurrentVisionType.CurrentVision == platformColor && playerInActivationZone && notActivatedYet && oculus.ShakingHeadChecker(shakingAxis, 15.0f, 60.0f, 0.3f, 0.5f, 0.0f, 2)) { //Debug.Log(shakingAxis + " WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"); animator.Play("Movement"); notActivatedYet = false; } else { //Debug.Log("Cond = " + (vision.CurrentVisionType.CurrentVision == platformColor) + " / " + (playerInActivationZone) + " / " + (notActivatedYet ) + " / lol"); } }