public void Start() { staffNotes = GameObject.FindGameObjectWithTag("staff"); originalSpeed = walkSpeed; staffNotes.SetActive(false); notesPlay = GameObject.FindGameObjectWithTag("npc").GetComponent <NotesInterface>(); staffLines = GameObject.Find("staff_lines"); staffLines.GetComponent <SpriteRenderer>().material.color = new Color(1.0f, 1.0f, 1.0f, 0.0f); }
// Picking up the items for the friendo IEnumerator pickupItemGame() { // When the currentLevel increases in the music game it means they completed it. NotesInterface notesPlay = beginRythmGame(true); int before = notesPlay.getCurrentSong(); yield return(new WaitUntil(() => (before + 1) == notesPlay.getCurrentSong())); beginRythmGame(false); inventory += 1; Debug.Log("CurrentSong: " + notesPlay.getCurrentSong()); FriendoPartsScript friend = closestFriendPart.GetComponent <FriendoPartsScript>(); friend.pickupItem(); }