Ejemplo n.º 1
0
    void Update()
    {
        int    score     = m_DanceManager.GetCurrentScore();
        string scoreText = score.ToString();

        GetComponent <TextMesh>().text = scoreText;
    }
Ejemplo n.º 2
0
    // 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));
        }
    }
Ejemplo n.º 3
0
    // 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;
        }
    }
Ejemplo n.º 4
0
 // 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));
         }
     }
 }