Example #1
0
        public override bool Update(int tick)
        {
            if (tasks != null && tasks.Any())
            {
                if (tasks.First().TaskComplete(this))
                {
                    tasks.RemoveAt(0);

                    if (tasks.Count == 0)
                    {
                        tasks = null;
                    }
                }
                if (tasks != null)
                {
                    tasks.First().StartTask(this);
                }
            }
            if (route.Count > 1)
            {
                //Beweegt de robot samen met de rack elke frame
                this.Move(route[1]);
                if (this.rack != null)
                {
                    _rack.Move(this._x, this._y + 1, this._z);
                }
            }
            return(base.Update(tick));
        }
Example #2
0
        /// <summary>
        /// DIsarm rack from robot
        /// </summary>
        public void DropRack()
        {
            currentRack.currentNode = currentNode;

            currentRack.Move(this.x, 0.2, this.z - 2);
            currentRack = null;
        }
Example #3
0
 public void AssignRack(Rack rack)
 {
     if (rack.point == this.currentPoint)
     {
         rack.AssignPoint(null);
         this._rack = rack;
         _rack.Move(this._x, this._y + 1, this._z);
         needsUpdate = true;
     }
 }
Example #4
0
 public void AddRack(Rack rack)
 {
     _racks.Add(rack);
     rack.AssignPoint(null);
     rack.Move(this.x, this.y + 0.2m, this.z);
 }