Beispiel #1
0
    public override void OnPlayerInteracting(PlayerInteract player)
    {
        if (player.HoldingState == PlayerHoldingState.Seed && babyGrowth.CurrentState == BabyGrowth.GrowingState.Dormant)
        {
            babyGrowth.PlantSeed();
            player.DropResource();
        }
        else if (player.HoldingState == PlayerHoldingState.Water && player.WaterCharges > 0 && babyGrowth.IsGrowing())
        {
            babyGrowth.FillWater();
            player.WaterCharges--;

            if (player.WaterCharges == 0)
            {
                player.DropResource();
            }
        }
    }