public void GetItem() { if (Staff != null) { if (GameProcesses.CurrentItem != null && Staff.name == GameProcesses.CurrentItem.name) { GameProcesses.HideCurrentItem(); return; } GameProcesses.HideCurrentItem(); switch (Staff.name) { case "Paper": Staff.GetComponent <Paper>().ShowPicture(); return; case "Phone": Staff.GetComponent <Phone>().ShowMenu(); break; default: GameProcesses.SetItem(Staff); break; } } }
private void OnMouseDown() { GameProcesses.SetItem(gameObject); GetComponent <PolygonCollider2D>().enabled = false; }