public void RemoveButton_Click() { if (currentNote == null) { return; } notes.Remove(currentNote); currentNote.DestroyMe(); currentNote = null; }
public void AddButton_Click() { // Spawn a prefab ~ 2m forward of our current position; var position = mobile.position + mobile.forward * 2f; var gameObject = Instantiate(bugReportPrefab, position, Quaternion.identity); currentNote = gameObject.GetByInterfaceInChildren <IStickyNoteBugItem>(); notes[currentNote] = new StickyNote() { Position = position, BugText = "Add Text Here", Scene = SceneManager.GetActiveScene().name, Timestamp = DateTime.Now }; SetCurrentNote(notes[currentNote]); }
public void BugTrigger_Leave() { currentNote = null; }
public void BugTrigger_Entered(IStickyNoteBugItem bugItem) { currentNote = bugItem; }