void OnMouseDown() { //print("Test"); Vector3 screenPoint = Camera.main.WorldToScreenPoint(this.transform.position); //Vector3 offset = this.transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z)); // Create new box in front of user //GameObject newBox = Instantiate(note, new Vector3(0, 0, 0), Quaternion.identity, canvas.transform); //GameObject newMenu = Instantiate(menu, new Vector3(0, 0, 0), Quaternion.identity, newBox.transform); ////newMenu.SetActive(false); //newBox.transform.position = canvas.transform.position; //newBox.transform.rotation = canvas.transform.rotation; //newBox.transform.localScale = new Vector3(1, 1, 1); //newMenu.transform.position = newBox.transform.position; //newMenu.transform.rotation = newBox.transform.rotation; //newMenu.transform.localScale = new Vector3(30, 30, 30); //newMenu.transform.position = new Vector3(newMenu.transform.position.x - 2, newMenu.transform.position.y, 10); //noteManager.CreateNote(newBox); noteManager.CreateNote(new Vector3(0, 0, 0), "choosing-the-type"); }
public ActionResult Insert(string title, string contents) { int noteId = NoteManager.CreateNote(title, contents); return(RedirectToAction("Detail", new { id = noteId })); }