void Reset() { if (playNotes == null) { playNotes = GetComponent <PlayNotes>(); } }
// 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); }
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); }