Exemple #1
0
            public StraightThrough(StraightConveyorInfo info, ThreeWaySwitch _threeWaySwitch) : base(info)
            {
                straightConveyorInfo = info;
                threeWaySwitch       = _threeWaySwitch;

                _threeWaySwitch.AllRoutes.Add(this);
                WaitingConveyors.Add(ThreeWayRoutes.Left, waitingForLeft);
                WaitingConveyors.Add(ThreeWayRoutes.Right, waitingForRight);
                WaitingConveyors.Add(ThreeWayRoutes.Center, waitingForCenter);

                Length           = threeWaySwitch.threeWaySwitchInfo.threeWayLength;
                endAP            = TransportSection.Route.InsertActionPoint(Length - 0.3f);
                startAP          = TransportSection.Route.InsertActionPoint(0.3f);
                startAP.OnEnter += startAP_OnEnter;
                endAP.OnEnter   += endAP_OnEnter;

                crossOverX = new CrossOver(Core.Environment.Scene.DefaultColor, 1, 0.05f, 0.3f, _threeWaySwitch)
                {
                    straightThrough = this
                };
                crossOverY = new CrossOver(Core.Environment.Scene.DefaultColor, 1, 0.05f, 0.3f, _threeWaySwitch)
                {
                    straightThrough = this
                };

                Add(crossOverX);
                Add(crossOverY);

                RouteAvailable = RouteStatuses.Request;//3 way will control the release of loads onto the transfer
                _threeWaySwitch.OnDimensionsChanged += threeWaySwitch_OnDimensionsChanged;
                StartFixPoint.OnSnapped             += StraightStartFixPoint_OnSnapped;
                StartFixPoint.OnUnSnapped           += StraightStartFixPoint_OnUnSnapped;
                OnNextRouteStatusAvailableChanged   += StraightThrough_OnNextRouteStatusAvailableChanged;
            }
Exemple #2
0
 public CrossOver(Color color, float length, float height, float width, ThreeWaySwitch _threeWaySwitch) : base(color, length, height, width)
 {
     threeWaySwitch = _threeWaySwitch;
     startAP        = Route.InsertActionPoint(0);
     endAP          = Route.InsertActionPoint(length);
     endAP.OnEnter += endAP_OnEnter;
     threeWaySwitch.OnDimensionsChanged += threeWaySwitch_OnDimensionsChanged;
     Route.Arrow.Visible = false;
 }