Esempio n. 1
0
    public void OnClick()
    {
        var fieldMenuType = fieldMenuEnum.None;

        if (crop == null && Input.GetMouseButtonDown(0))
        {
            fieldMenuType = fieldMenuEnum.Shop;
            // Debug.Log("new shop: " + fieldMenu.ToString());
        }
        else if (HarvestedCrop == null && Input.GetMouseButtonDown(1))
        {
            fieldMenuType = fieldMenuEnum.Harvest;
            // Debug.Log("new harvest: " + fieldMenu.ToString());
        }
        FieldMenu fieldMenu = getFieldMenu(fieldMenuType);

        if (fieldMenu != null)
        {
            UpdateUIDialog(fieldMenu);
            dialog.ShowPanel();
        }
    }