Esempio n. 1
0
    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;
            }
        }
    }
Esempio n. 2
0
 private void OnMouseDown()
 {
     GameProcesses.SetItem(gameObject);
     GetComponent <PolygonCollider2D>().enabled = false;
 }