public FixDescriptor([NotNull] FixAttribute attribute, [NotNull] IFix fix) { Assert.ArgumentNotNull(attribute, nameof(attribute)); Assert.ArgumentNotNull(fix, nameof(fix)); Attribute = attribute; Fix = fix; }
private void Start() { EventManager.AddListener <BrokenStuffTriggerEvent>(OnBrokenStuffTriggerEnter); fixSystem = new FixSystem(); fixSystem.Setup(fixTime); fixEffect = Instantiate(fixEffectPrefab, transform.position, Quaternion.identity); fixEffect.Stop(); }
public Tour CloneWithSwap(IFix firstFix, IFix secondFix) { Stop firstFrom = null, secondFrom = null; var stops = UnconnectedClones(); stops.Connect(true); foreach (Stop stop in stops) { if (stop.Fix == firstFix) { firstFrom = stop; } if (stop.Fix == secondFix) { secondFrom = stop; } } //the swap part var firstTo = firstFrom.Next; var secondTo = secondFrom.Next; //reverse all of the links between the swaps firstTo.CanGetTo() .TakeWhile(stop => stop != secondTo) .Reverse() .Connect(false); firstTo.Next = secondTo; firstFrom.Next = secondFrom; var tour = new Tour(stops); return(tour); }
/// <summary> /// Add a fix to the analysis /// </summary> /// <param name="fix"></param> internal void AddFix(IFix fix) { Assert.IsNotNull(fix, "Fix can't be null"); this.fixContainer.Add(fix); }
public Stop(IFix f) { Fix = f; }
/// <summary> /// Add a Fix to container /// </summary> /// <param name="fix"></param> internal void Add(IFix fix) { this.rootCauseList.Add(fix); }