Пример #1
0
        /// <summary>End the crop.</summary>
        public void EndCrop()
        {
            Summary.WriteMessage(this, "Crop ending");

            // Invoke a plant ending event.
            if (PlantEnding != null)
            {
                PlantEnding.Invoke(this, new EventArgs());
            }

            Clear();
            cultivarDefinition.Unapply();
        }
Пример #2
0
        /// <summary>End the crop.</summary>
        public void EndCrop()
        {
            if (IsAlive == false)
            {
                throw new Exception("EndCrop method called when no crop is planted.  Either your planting rule is not working or your end crop is happening at the wrong time");
            }
            Summary.WriteMessage(this, "Crop ending");

            // Invoke a plant ending event.
            if (PlantEnding != null)
            {
                PlantEnding.Invoke(this, new EventArgs());
            }

            Clear();
            if (cultivarDefinition != null)
            {
                cultivarDefinition.Unapply();
            }
        }