IEnumerator SelectSword(float waitTime) { yield return(new WaitForSeconds(waitTime)); if (!showHand.GetSelected()) { WeponBox2.ActiveVR(); } }
// Update is called once per frame void Update() { // Debug.Log (isActive); if (ShowHandControl.GetSelected()) { //DeActiveWepon(); return; } /* * fillAmount -= Time.deltaTime; * * if (isActive) { * fillAmount += Time.deltaTime * 2f; * } * fillAmount = Mathf.Clamp01 (fillAmount); * barControl.fillAmount = fillAmount; * * if (fillAmount == 1f) { * barControl.fillAmount = 0; * ShowHandControl.SelectedSword(wepon); * } */ }