void Update() { timer += Time.deltaTime; //scoreText.text = counter.ToString(); if (timer > lifetime) { playerOwner.ProjectileDestroyedTime(this); Destroy(this.gameObject); } /*if (counter == 5) * { * UnityEngine.SceneManagement.SceneManager.LoadScene("WinPage"); * }*/ }