void Update() { // Move the Ring ring.transform.position = transform.position + new Vector3(0f, 0.01f, 0f); if (isActive) { currentTime = Time.time - startTime; if (duration < currentTime) { isActive = false; // Reset Values GetComponent <PlayerMoveScript>().speed = saveSpeed; GetComponent <PlayerShootScript>().delay = saveShoot; GetComponent <HealthScript>().isHealing = false; // Hide Ring ring.Arc = 0; ring.SetVerticesDirty(); } else { // Update Ring ring.Arc = 1 - currentTime / duration; ring.SetVerticesDirty(); } } }
// Update is called once per frame void Update () { if (CrossPlatformInputManager.Instance.AbortButtonDown) { _curHoldTime += Time.deltaTime; if (_curHoldTime > HoldTime) { ExperimentManager.Instance.AbortExperiment(); } else { Circle.fillPercent = (int)Mathf.Round((_curHoldTime / HoldTime) * 100); Circle.SetVerticesDirty(); } } else { Fader.FadeOut(); enabled = false; } }