public void buttonClicked()
 {
     if (flag == false)
     {
         time = Time.time;
         var minutes  = Mathf.Floor(time / 60);
         var seconds  = time % 60;//Use the euclidean division for the seconds.
         var fraction = (time * 1000) % 1000;
         counter++;
         ////timerLabel.text = string.Format("{0:00} : {1:00} : {2:00}", minutes, seconds, fraction);
         //Debug.Log(string.Format("{0:00} : {1:00} : {2:00}", minutes, seconds, fraction));
         //Debug.Log("Counter: " + counter + "time" + time);
         CheckAccuracy checkAccuracy = TheCamera.gameObject.GetComponent <CheckAccuracy>();
         checkAccuracy.tappedNoteSequence += " - " + (Mathf.Round((time) * 1000f) / 1000f).ToString();
     }
     else
     {
         counter = 0;
         flag    = false;
     }
 }
Ejemplo n.º 2
0
    //[SerializeField] Text inventoryText;


    public void HasChanged()
    {
        List <noteValue> noteSequence = new List <noteValue>();

        System.Text.StringBuilder builder = new System.Text.StringBuilder();
        builder.Append(" - ");
        foreach (Transform slotTransform in slots)
        {
            GameObject item = slotTransform.GetComponent <Slot>().Item;
            if (item)
            {
                builder.Append(item.gameObject.GetComponent <noteValue>().noteDuration);
                builder.Append(" - ");
                noteSequence.Add(item.gameObject.GetComponent <noteValue>());
            }
        }
        //inventoryText.text = builder.ToString();
        CheckAccuracy checkAccuracy = TheCamera.gameObject.GetComponent <CheckAccuracy>();

        checkAccuracy.producedNoteSequence = builder.ToString();
    }