/// <summary> /// The handle motor pulse. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> public static void HandleMotorPulse(object sender, OnMotorPulseEventArgs e) { var conveyor = e.Maker.FirstConveyor; var stamperIndex = e.Maker.Settings.StamperIndex; var biscuitToBeStamped = conveyor.Belt.ElementAt(stamperIndex); var stampedBiscuit = Stamper.Stamp(biscuitToBeStamped); conveyor.Belt.Insert(stamperIndex, stampedBiscuit); conveyor.Belt.RemoveAt(stamperIndex + 1); }
/// <summary> /// The handle motor pulse. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> public static void HandleMotorPulse(object sender, OnMotorPulseEventArgs e) { var conveyor = e.Maker.FirstConveyor; // ToDo: Set Extruder and Stamper to work async Extruder.HandleMotorPulse(sender, e); Stamper.HandleMotorPulse(sender, e); BucketManager.HandleMotorPulse(sender, e); RollBelt(conveyor); }