示例#1
0
    private void OnMouseDown()
    {
        if (Controler == Action.Grab)
        {
            value.PickUpFruit();
        }
        else if (Controler == Action.water && player.water != 0)
        {
            player.water--;

            value.CountDownWater();
        }
        else if (Controler == Action.feed && player.manure != 0)
        {
            player.manure--;

            value.CountDownManure();
        }
        else if (Controler == Action.powerUp)
        {
            mainPlant.PowerUp();
        }
        else if (Controler == Action.addWater)
        {
            player.water++;
        }
        else if (Controler == Action.addFeed)
        {
            player.manure++;
        }
        else
        {
            Debug.Log("Not defined Controler in: " + this.gameObject);
        }
    }