public virtual void Handle(ResourceHarvested message)
 {
     CurrentlyCarrying++;
     if (CurrentlyCarrying == MAX_CAPACITY)
     {
         _villagerActor.Tell(new MaxCapacityReached(CurrentlyCarrying));
         Context.Stop(Self);
     }
     else
     {
         _messageScheduler.ScheduleTellOnce(TimeSpan.FromMilliseconds(200), Self, new ResourceHarvested(), Self);
     }
 }
 public override void Handle(ResourceHarvested message)
 {
     base.Handle(message);
     //Console.WriteLine("1 unit of {0} harvested. (carrying {1}).", ResourceToHarvest, CurrentlyCarrying);
 }
Ejemplo n.º 3
0
 public override void Handle(ResourceHarvested message)
 {
     base.Handle(message);
     //Console.WriteLine("1 unit of {0} harvested. (carrying {1}).", ResourceToHarvest, CurrentlyCarrying);
 }