Ejemplo n.º 1
0
    public void ChangeView(CameraLocations directionToLook)
    {
        if (NoFade)
        {
            switch (directionToLook)
            {
            case CameraLocations.UP:
                MoveCamera(CameraLocationForUp.position);
                break;

            case CameraLocations.FORWARD:
                MoveCamera(CameraLocationForForward.position);
                break;

            case CameraLocations.LEFT:
                MoveCamera(CameraLocationForLeft.position);
                break;

            case CameraLocations.RIGHT:
                MoveCamera(CameraLocationForRight.position);
                break;

            default:
                break;
            }
        }
        else
        {
            switch (directionToLook)
            {
            case CameraLocations.UP:
                _movePosition = CameraLocationForUp.position;
                _fadingOut    = true;
                break;

            case CameraLocations.FORWARD:
                _movePosition = CameraLocationForForward.position;
                _fadingOut    = true;
                break;

            case CameraLocations.LEFT:
                _movePosition = CameraLocationForLeft.position;
                _fadingOut    = true;
                break;

            case CameraLocations.RIGHT:
                _movePosition = CameraLocationForRight.position;
                _fadingOut    = true;
                break;

            default:
                break;
            }
        }
    }
Ejemplo n.º 2
0
    public void FindCurrentDialog(CameraLocations location, DialogLoadType loadType) //Date and time as other params possibly
    {
        string path = "Resources/DialogInstances/";

        path += "Phase" + _theGameManager.PhaseIndex + 1;

        switch (location)
        {
        case CameraLocations.DECK:
            path += "Deck/";
            break;

        case CameraLocations.DREAM:
            path += "Dream/";
            break;

        case CameraLocations.UP:
            path += "BelowDeckUp/";
            break;

        case CameraLocations.FORWARD:
            path += "BelowDeckForward/";
            break;

        case CameraLocations.RIGHT:
            path += "BelowDeckRight/";
            break;

        case CameraLocations.LEFT:
            path += "BelowDeckLeft/";
            break;

        default:
            break;
        }

        path += loadType.ToString();

        CurrentInstance = (DialogInstance)Resources.Load(path);
    }
        protected void Button_Click_1(object sender, RoutedEventArgs e)
        {
            int i = 0;

            foreach (var textbox in StackLocation.Children)
            {
                if (i == 0)
                {
                    i++;
                    continue;
                }
                CameraLocations.Add((textbox as TextBox).Text);
            }

            i = 0;
            foreach (var textbox in StackNumber.Children)
            {
                if (i == 0)
                {
                    i++;
                    continue;
                }
                CameraNumbers.Add((textbox as TextBox).Text);
            }
            i = 0;
            foreach (var textbox in StackTime.Children)
            {
                if (i == 0)
                {
                    i++;
                    continue;
                }
                DateTimes.Add((textbox as TextBox).Text);
            }
            this.Close();
        }
Ejemplo n.º 4
0
 private void ChangeCamera(CameraLocations cameraLocations)
 {
     _theGameManager.TheCameraManager.ChangeView(cameraLocations);
     _theMenuManager.CloseAllMenus();
 }
Ejemplo n.º 5
0
      public ValueParameter GetLightValue(CameraLocations camera)
      {
         ValueParameter result = null;

         if (CameraLocations.robotFrontUpperBack == camera)
         {
            result = this.robotLightLevels[0];
         }
         else if (CameraLocations.robotLowerBack == camera)
         {
            result = this.robotLightLevels[1];
         }
         else if (CameraLocations.robotFrontUpperDown == camera)
         {
            result = this.robotLightLevels[2];
         }
         else if (CameraLocations.robotRearUpperForward == camera)
         {
            result = this.robotLightLevels[3];
         }
         else if (CameraLocations.robotRearUpperDown == camera)
         {
            result = this.robotLightLevels[4];
         }
         else if (CameraLocations.robotFffDrill == camera)
         {
            result = this.robotLightLevels[5];
         }
         else if (CameraLocations.robotRearUpperBack == camera)
         {
            result = this.robotLightLevels[6];
         }
         else if (CameraLocations.robotFrontUpperForward == camera)
         {
            result = this.robotLightLevels[7];
         }
         else if ((CameraLocations.robotSensorArm == camera) ||
                  (CameraLocations.robotRffDrill == camera))  
         {
            result = this.robotLightLevels[8];
         }
         else if (CameraLocations.robotLowerForward == camera)
         {
            result = this.robotLightLevels[9];
         }
         else if (CameraLocations.robotFrfDrill == camera)
         {
            result = this.robotLightLevels[10];
         }
         else if ((CameraLocations.robotSensorBay == camera) ||
                  (CameraLocations.robotRrfDrill == camera))
         {
            result = this.robotLightLevels[11];
         }
         else if (CameraLocations.launchLeftGuide == camera)
         {
            result = this.launchLightLevels[0];
         }
         else if (CameraLocations.launchRightGuide == camera)
         {
            result = this.launchLightLevels[1];
         }
         else if (CameraLocations.launchFeeder == camera)
         {
            result = this.launchLightLevels[2];
         }
         else if (CameraLocations.launchMain == camera)
         {
            result = this.launchLightLevels[3];
         }

         return (result);
      }
Ejemplo n.º 6
0
      public double GetLightLevel(CameraLocations camera)
      {
         double result = 0;
         ValueParameter value = this.GetLightValue(camera);

         if (null != value)
         {
            result = value.OperationalValue;
         }

         return (result);
      }
Ejemplo n.º 7
0
      public void SetCameraLightLevel(CameraLocations camera, int level)
      {
         int index = -1;

         if (CameraLocations.launchLeftGuide == camera)
         {
            index = 2; // 0;
         }
         else if (CameraLocations.launchRightGuide == camera)
         {
            index = 3; // 1;
         }
         else if (CameraLocations.launchFeeder == camera)
         {
            index = 0; // 2;
         }
         else if (CameraLocations.launchMain == camera)
         {
            index = 1; // 3;
         }

         if (index >= 0)
         {
            this.launchCameraLightIntensities[index] = level;
         }
      }
Ejemplo n.º 8
0
 public void SetLaunchCamera(CameraLocations camera)
 {
    this.selectedLaunchCamera = camera;
 }
Ejemplo n.º 9
0
      private void InitilizeLaunchTubeDigitalIo()
      {
         this.launchDigitalIo.Initialize();

         this.selectedLaunchCamera = CameraLocations.launchLeftGuide; // launch digital IO
         this.launchDigitalOutRequested = 0;
      }
Ejemplo n.º 10
0
      public void SetCameraLightLevel(CameraLocations camera, int level)
      {
         int cameraIndex = this.GetVideoCameraId(camera);

         if (cameraIndex > 0)
         {
            this.cameraLightLevelSetPoints[cameraIndex - 1] = level;
         }
      }
Ejemplo n.º 11
0
      private int GetVideoCameraId(CameraLocations camera)
      {
         int videoSetPoint = 0;

         if (RobotApplications.repair == ParameterAccessor.Instance.RobotApplication)
         {
            if (CameraLocations.robotFrontUpperBack == camera)
            {
               videoSetPoint = 2;
            }
            else if (CameraLocations.robotLowerBack == camera)
            {
               videoSetPoint = 12;
            }
            else if (CameraLocations.robotFrontUpperDown == camera)
            {
               videoSetPoint = 3;
            }
            else if (CameraLocations.robotRearUpperForward == camera)
            {
               videoSetPoint = 8;
            }
            else if (CameraLocations.robotRearUpperDown == camera)
            {
               videoSetPoint = 10;
            }
            else if (CameraLocations.robotFffDrill == camera)
            {
               videoSetPoint = 7;
            }
            else if (CameraLocations.robotRearUpperBack == camera)
            {
               videoSetPoint = 9;
            }
            else if (CameraLocations.robotFrontUpperForward == camera)
            {
//5 RRF DRILL
               videoSetPoint = 4;
            }
            else if (CameraLocations.robotRffDrill == camera)
            {
               videoSetPoint = 11;
            }
            else if (CameraLocations.robotLowerForward == camera)
            {
               videoSetPoint = 1;
            }
            else if (CameraLocations.robotFrfDrill == camera)
            {
               videoSetPoint = 6;
            }
            else if (CameraLocations.robotRrfDrill == camera)
            {
               videoSetPoint = 5;
            }
         }
         else if (RobotApplications.inspect == ParameterAccessor.Instance.RobotApplication)
         {
            if (CameraLocations.robotFrontUpperBack == camera)
            {
               videoSetPoint = 1;
            }
            else if (CameraLocations.robotLowerBack == camera)
            {
               videoSetPoint = 2;
            }
            else if (CameraLocations.robotFrontUpperDown == camera)
            {
               videoSetPoint = 3;
            }
            else if (CameraLocations.robotRearUpperForward == camera)
            {
               videoSetPoint = 4;
            }
            else if (CameraLocations.robotRearUpperDown == camera)
            {
               videoSetPoint = 5;
            }
            else if (CameraLocations.robotRearUpperBack == camera)
            {
               videoSetPoint = 7;
            }
            else if (CameraLocations.robotFrontUpperForward == camera)
            {
               videoSetPoint = 8;
            }
            else if (CameraLocations.robotSensorArm == camera)
            {
               videoSetPoint = 9;
            }
            else if (CameraLocations.robotLowerForward == camera)
            {
               videoSetPoint = 10;
            }
            else if (CameraLocations.robotFrfDrill == camera)
            {
               videoSetPoint = 11;
            }
            else if (CameraLocations.robotSensorBay == camera)
            {
               videoSetPoint = 12;
            }
         }

         return (videoSetPoint);
      }
Ejemplo n.º 12
0
 public void SetRobotCameraB(CameraLocations camera)
 {
    this.cameraB = camera;
    this.videoBSetPoint = this.GetVideoCameraId(camera);
 }
Ejemplo n.º 13
0
      private void InitializeValues()
      {
         this.busReady = false;
         this.busStatus = null;
         this.busReceiveQueue.Clear();
         this.deviceResetQueue.Clear();

         this.robotBody.NodeId = (byte)ParameterAccessor.Instance.RobotBus.RobotBodyBusId;
         this.robotTopFrontWheel.NodeId = (byte)ParameterAccessor.Instance.RobotBus.RobotTopFrontWheelBusId;
         this.robotTopRearWheel.NodeId = (byte)ParameterAccessor.Instance.RobotBus.RobotTopRearWheelBusId;
         this.robotBottomFrontWheel.NodeId = (byte)ParameterAccessor.Instance.RobotBus.RobotBottomFrontWheelBusId;
         this.robotBottomRearWheel.NodeId = (byte)ParameterAccessor.Instance.RobotBus.RobotBottomRearWheelBusId;

         this.TraceMask = ParameterAccessor.Instance.RobotBus.ControllerTraceMask;
         this.robotBody.TraceMask = ParameterAccessor.Instance.RobotBus.RobotBodyTraceMask;
         this.robotTopFrontWheel.TraceMask = ParameterAccessor.Instance.RobotBus.RobotTopFrontWheelTraceMask;
         this.robotTopRearWheel.TraceMask = ParameterAccessor.Instance.RobotBus.RobotTopRearWheelTraceMask;
         this.robotBottomFrontWheel.TraceMask = ParameterAccessor.Instance.RobotBus.RobotBottomFrontWheelTraceMask;
         this.robotBottomRearWheel.TraceMask = ParameterAccessor.Instance.RobotBus.RobotBottomRearWheelTraceMask;

         this.InitializeRobotBody();

         this.movementMode = MovementModes.off;
         this.movementForwardMode = MovementForwardModes.normalAxial;
         this.movementWheelModeChangeRequest = MovementWheelModes.neither;
         this.movementWheelModeActual = MovementWheelModes.neither;
         this.movementTopFrontWheelStatus.Initialize();
         this.movementTopRearWheelStatus.Initialize();
         this.movementBottomFrontWheelStatus.Initialize();
         this.movementBottomRearWheelStatus.Initialize();

         this.drillFrontRotationSetPoint = 0;
         this.drillRearRotationSetPoint = 0;
         this.drillFrontIndexSetPoint = 0;
         this.drillRearIndexSetPoint = 0;
         this.drillFrontLaserSetPoint = false;
         this.drillRearLaserSetPoint = false;

         this.cameraA = CameraLocations.robotFrontUpperBack;
         this.cameraB = CameraLocations.robotLowerBack;
         this.videoASetPoint = 0;
         this.videoBSetPoint = 0;

         for (int i = 0; i < this.cameraLightLevelSetPoints.Length; i++)
         {
            this.cameraLightLevelSetPoints[i] = 0;
         }
      }
Ejemplo n.º 14
0
 public void SetCameraLightLevel(CameraLocations camera, int level)
 {
    if ((CameraLocations.launchLeftGuide == camera) ||
        (CameraLocations.launchRightGuide == camera) ||
        (CameraLocations.launchFeeder == camera) ||
        (CameraLocations.launchMain == camera))
    {
       TruckCommBus.Instance.SetCameraLightLevel(camera, level);
    }
    else
    {
       RobotCommBus.Instance.SetCameraLightLevel(camera, level);
    }
 }
Ejemplo n.º 15
0
 public void SetRobotCameraB(CameraLocations camera)
 {
    RobotCommBus.Instance.SetRobotCameraB(camera);
 }
Ejemplo n.º 16
0
 public void SetLaunchCamera(CameraLocations camera)
 {
    TruckCommBus.Instance.SetLaunchCamera(camera);
 }