void Awake() { if (!PlayerPrefs.HasKey("FoundNotes")) { PlayerPrefs.SetString("FoundNotes", ""); } if (!noteDisplay.gameObject.activeInHierarchy) { noteDisplay = Instantiate(noteDisplay) as NoteDisplay; } animator = GetComponentInChildren <Animator>(); }
/// <summary> /// Saves the note /// </summary> /// <param name="note">The <see cref="INote"/></param> public virtual void SaveNote(NoteDisplay note) { // Check for existing note and modify it if it already exists so we don't end up with lots of orphan notes if the customer keeps submitting. var existingNote = GetNote(); if (existingNote != null) { existingNote.Message = note.Message; } else { Customer.ExtendedData.AddNote(note); } SaveCustomer(MerchelloContext, Customer, RaiseCustomerEvents); }
// Use this for initialization void Start() { noteList = GetComponent <NoteSpawner>().foundNotes; randomNotes = GetComponent <NoteSpawner>().randomNotes; noteDisplay = GetComponent <Player>().noteDisplay; }