Ejemplo n.º 1
0
        /*public void AddRek(Rek r)
         * {
         *  r.readyforpickup = false;
         *  for (int i = 0; i < Stored.Count; i++)
         *  {
         *      if (Stored[i] == null)
         *      {
         *          Stored[i] = r;
         *          r.Move((i * 2.5) + position_x, 0, position_z + 2.5);
         *      }
         *  }
         * }*/

        public void AddRek(Rek r)
        {
            r.readyforpickup = false;

            Stored.Add(r);
            r.Move((Stored.Count * 2.5) + position_x, 0, position_z + 2.5);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Accept a Rek from a robot, and store it
 /// </summary>
 /// <param name="r">rek to be stored</param>
 public void AddRek(Rek r)
 {
     r.readyforpickup = false;
     for (int i = 0; i < 10; i++)
     {
         if (Stored.ElementAtOrDefault(i) == null)
         {
             r.Move((i * 1.5) + position_x, 0, position_z + 2.5);
             Stored.Add(r);
             return;
         }
     }
 }
Ejemplo n.º 3
0
 public override bool Update(int tick)
 {
     Main();
     if (carriedRek != null)
     {
         carriedRek.Move(this.x, this.y + 0.5, this.z);
     }
     if (needsUpdate)
     {
         needsUpdate = false;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
        public override bool Update(int tick)
        {
            switch (this._state)
            {
            case TreiState.TRAIN_INCOMMING:
                this.MoveTo(15, 0, -5, this.AtLoadingDock);
                break;

            case TreiState.AT_LOADING_DOCK:
                if (CarriedRek != null)    // Als we een rek hebben gekregen sinds de laatste Update()
                {
                    Depart();
                }
                break;

            case TreiState.TRAIN_DEPARTING:
                this.MoveTo(40, 0, -5, this.Departed);
                break;
            }

            if (CarriedRek != null)
            {
                CarriedRek.Move(this.x, this.y, this.z);
            }



            // CreateRek(15,0,-5);

            if (needsUpdate)
            {
                needsUpdate = false;
                return(true);
            }

            return(false);
        }