private void Update() { float height = GameManager.GetDistanceToFloor(_playerBlockSpawner.GetTopMostPoint()); height = Mathf.Round(height * 10000) / 100; height = Mathf.Round(height); _heightText.text = "" + (float.IsInfinity(height) ? 0 : height); }
// Update is called once per frame void Update() { if (GameManager.IsPaused) { return; } if (GameManager.GetDistanceToFloor(player1.GetTopMostPoint()) > distanceToGoal) { _winner = GameManager.PlayerIndex.One; GameManager.CompleteGame(_winner); print("Spelare 1 är bäst"); } if (GameManager.GetDistanceToFloor(player2.GetTopMostPoint()) > distanceToGoal) { _winner = GameManager.PlayerIndex.Two; GameManager.CompleteGame(_winner); print("Spelare 2 är bäst"); } }