private void Update() { if (_timer.Countdown(Time.deltaTime)) { _text.text = _timer.ShowTimeInMinutes(); } else { _text.text = "Play"; _selfButton.interactable = true; } }
//public float windDirection; private void OnTriggerStay(Collider other) { if (other.gameObject.CompareTag("Player")) { Rigidbody rb = other.gameObject.GetComponent <Rigidbody>(); Vector3 windForce = new Vector3(-windPower, 0, 0); rb.AddForce(windForce); } if (other != null) { ITimer otherTimer = other.gameObject.GetComponent <ITimer>(); if (otherTimer != null) { otherTimer.GetTimer(); otherTimer.Countdown(2); } } }