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)); }
/// <summary> /// DIsarm rack from robot /// </summary> public void DropRack() { currentRack.currentNode = currentNode; currentRack.Move(this.x, 0.2, this.z - 2); currentRack = null; }
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; } }
public void AddRack(Rack rack) { _racks.Add(rack); rack.AssignPoint(null); rack.Move(this.x, this.y + 0.2m, this.z); }