void Update() { int score = m_DanceManager.GetCurrentScore(); string scoreText = score.ToString(); GetComponent <TextMesh>().text = scoreText; }
// Update is called once per frame void Update() { float currentScore = m_DanceManager.GetCurrentScore(); if (currentScore < ScoreThreshold) { transform.position = original_position; transform.Translate(drift_vector * Mathf.Sin(Time.time)); transform.Rotate(spin_vector * Mathf.Cos(Time.time)); } }
// Update is called once per frame void Update() { float currentScore = m_DanceManager.GetCurrentScore(); if (currentScore >= ScoreThreshold) // time to start scrolling down - what fun! { Vector3 currentPostion = this.transform.position; if (currentPostion.y < EndingPoint.position.y) { currentPostion.y += Speed * Time.deltaTime; } this.transform.position = currentPostion; } }
// Update is called once per frame void Update() { if (!myDanceManager) { myDanceManager = FindObjectOfType <DanceManager>(); } else { int curr_score = myDanceManager.GetCurrentScore(); if (curr_score != score_was) { score_was = curr_score; transform.position = Vector3.Lerp(initialPosition, winningPosition, (((float)curr_score) / myDanceManager.winningScore)); } } }