private static void InitializeProgram(int currentParkedFloorValue, out ILift lift) { FloorConfiguration floorConfig = new FloorConfiguration(currentParkedFloorValue, MINFLOOR, MAXFLOOR); IExecutionPlan plan = new ExecutionPlan(); lift = new Lift(floorConfig, plan); }
public Elevator(int id, ILift lift, IFloorManager floorManager, int maxFloorcount, int currentFloor) { this.id = id; this.lift = lift; this.floorManager = floorManager; this.currentFloor = currentFloor; this.maxFloorcount = maxFloorcount; }
public LiftController(ILift lift1, ILift lift2, ILift lift3) { _lift1 = lift1; _lift2 = lift2; _lift3 = lift3; _lifts.Add(_lift1); _lifts.Add(_lift2); _lifts.Add(_lift3); }
private void ChangeLift(ILift lift) { if (Lift != null) { DeleteConnections(Lift); } Lift = lift; if (Lift != null) { SetupConnections(Lift); } UpdateView(); }
public static void Lift(ILift node) { if (node.CanLift() && !Carrying) { Carrying = true; CarriedNode = node; PlayerReticle.Singleton.Visible = false; node.ShowAndActivate(false); Singleton.PreviewMesh.Visible = true; SetPreview(node.GetPreviewMesh(), node.GetPreviewMaterial()); PositionPreview(node.GetOwner().GlobalTransform.origin); } }
private static void Run(ILift lift) { WriteInstructions(); string input = "default"; while (!string.IsNullOrWhiteSpace(input)) { input = Console.ReadLine(); IList <SummonInformation> requests = input.ExtractRequests(); var executionPlan = lift.ProcessRequests(requests); Console.Write($"List of floor visited in order: {executionPlan.ToString()}"); Console.Write(Environment.NewLine); } }
protected override void DeleteConnections(ILift lift) { base.DeleteConnections(lift); lift.OnStateChanged -= OnStateChanged; }
protected override void SetupConnections(ILift lift) { base.SetupConnections(lift); lift.OnStateChanged += OnStateChanged; }
protected override void SetupConnections(ILift lift) { base.SetupConnections(lift); Lift.OnFloorChanged += OnFloorChanged; }
protected virtual void DeleteConnections(ILift lift) { }
protected virtual void SetupConnections(ILift lift) { }