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 chest elke frame this.Move(route[1]); if (this.chest != null) { _chest.Move(this._x, this._y + 1, this._z); } } return(base.Update(tick)); }
public void AssignChest(Barrels chest) { if (chest.point == this.currentPoint) { chest.AssignPoint(null); this._chest = chest; _chest.Move(this._x, this._y + 1, this._z); needsUpdate = true; } }
public void AddChest(Barrels chest) { _chests.Add(chest); chest.AssignPoint(null); chest.Move(this.x, this.y + 0.2m, this.z); }