Ejemplo n.º 1
0
        public void Update(Calendar calendar)
        {
            long worldTime = calendar.GetTotalTimeUnit(Calendar.TimeUnit.Minute);
            long growTime  = worldTime - PlantedTime;

            CurrentGrowTime = growTime;

            UpdateCurrentStage();

            if (CurrentGrowTime >= TimeNeededToMature && !hasShownHarvestMessage)
            {
                Debug.WriteLine(Name + " ready to harvest. " + calendar.CurrentDateTime);
                hasShownHarvestMessage = true;
            }
        }
Ejemplo n.º 2
0
 public void Plant(Calendar calendar, Position plantedPosition)
 {
     this.PlantedTime = calendar.GetTotalTimeUnit(Calendar.TimeUnit.Minute);
 }