Beispiel #1
0
 void Reset()
 {
     if (playNotes == null)
     {
         playNotes = GetComponent <PlayNotes>();
     }
 }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     inputField.DeactivateInputField();
     inputField.gameObject.SetActive(false);
     playerField.gameObject.SetActive(true);
     playerField.ActivateInputField();
     player.UnlockMouse();
     notes        = FindObjectOfType <PlayNotes>();
     notes.typing = true;
     Debug.Log(playerField.isActiveAndEnabled);
 }
Beispiel #3
0
    public void PlayBackLast()
    {
        if (lastRecorded == null)
        {
            Debug.Log("No last recorded file on record.");
            return;
        }

        string      json     = File.ReadAllText(dataPath + lastRecorded + ".json");
        NotePattern nPattern = JsonUtility.FromJson <NotePattern>(json);

        PlayNotes playNotes = GetComponent <PlayNotes>();

        playNotes.PlayPattern(nPattern);
    }