public void OnSelect() { _tagAlong = FindObjectOfType <TagAlong>(); if (_tagAlong == null) { return; } OpenKeyboard(); }
public void Delete() { TagAlong tagAlong = FindObjectOfType <TagAlong>(); if (tagAlong == null) { return; } Destroy(tagAlong.StickyNote); Destroy(tagAlong.gameObject); var sound = GetComponent <SoundEffect>(); if (sound != null) { sound.PlaySoundEffect(); } }