Ejemplo n.º 1
0
    public override void VisitBuilding(int a, int b)
    {
        Crop c = world.Map.GetBuildingAt(a, b).GetComponent <Crop>();

        if (c == null)
        {
            return;
        }

        if (c.planted && !c.ReadyForHarvest)
        {
            return;
        }

        if (!c.planted && c.startTimes.Contains(time.CurrentMonth))
        {
            c.BeginGrow();
        }

        if (c.ReadyForHarvest && Yield < stockpile)
        {
            HarvestCrop(c);
        }
    }