Esempio n. 1
0
 /// <summary>
 /// Nyilvántartásba vesz egy gyümölcsöt
 /// </summary>
 /// <param name="UnderlyingFruit">A követendő gyümölcs</param>
 public Fruit(AntMe.English.Fruit UnderlyingFruit)
 {
     this.Type = ItemType.Fruit;
     this.UnderlyingFruit = UnderlyingFruit;
     if (BaseList.Contains(UnderlyingFruit) || UnderlyingFruit.Amount <= 0) { return; }
     List.Add(this);
 }
Esempio n. 2
0
 /// <summary>
 /// This method is called as soon as an ant sees an apple within its
 /// 360° visual range. The parameter is the piece of fruit that the
 /// ant has spotted.
 /// <see href="http://wiki.antme.net/en/API1:Spots(Fruit)">Read more</see>
 /// </summary>
 /// <param name="fruit">spotted fruit</param>
 public virtual void Spots(Fruit fruit)
 {
 }
Esempio n. 3
0
 /// <summary>
 /// Evaluates if the specified fruit needs more ants to carry it.
 /// <see href="http://wiki.antme.net/en/API1:NeedsCarrier">Read more</see>
 /// </summary>
 /// <param name="fruit">fruit</param>
 /// <returns>more ants required</returns>
 public bool NeedsCarrier(Fruit fruit)
 {
     return(((CoreFruit)fruit.Baseitem).BrauchtNochTräger(colony));
 }
Esempio n. 4
0
 /// <summary>
 /// If the ant’s destination is a piece of fruit, this method is called as soon
 /// as the ant reaches its destination. It means that the ant is now near enough
 /// to its destination/target to interact with it.
 /// <see href="http://wiki.antme.net/en/API1:DestinationReached(Fruit)">Read more</see>
 /// </summary>
 /// <param name="fruit">reached fruit</param>
 public virtual void DestinationReached(Fruit fruit)
 {
 }