Example #1
0
    public void ReceiveLove(Phrase phrase)
    {
        Plant plantToUse = null;

        if (plController.player1.player.onTurn)
        {
            plantToUse = plController.player1.plant;
        }
        else if (plController.player2.player.onTurn)
        {
            plantToUse = plController.player2.plant;
        }
        else
        {
            Debug.LogError("Somehow neither player is onTurn");
            return;
        }

        growmultiplicator = plantToUse.CheckLove(phrase.loveType);

        int newHeight = phrase.love * growmultiplicator;

        ReceiveHeight(plantToUse, newHeight);
    }