Exemplo n.º 1
0
        //Called when the ship/camera is placed on the map,
        public void nextStage()
        {
            if (stage == CameraStage.ShipSelect)
            {
                stage++;

                //If many HUMAN racers at this stage, then screen space limited, so adjust FOV.
                float   chaseFOV            = ICameraType.defaultFieldOfView;
                Vector3 chasePosition       = new Vector3(0.0f, 4.0f, 16.0f);
                Vector3 chaseFocalPoint     = new Vector3(0.0f, 1.0f, -40.0f);
                Vector3 chasePosition2      = new Vector3(0.0f, 2.5f, 12f);
                Vector3 chaseFocalPoint2    = new Vector3(0.0f, 1.0f, -30.0f);
                float   beatVisHeightOffset = 0f;
                if (Race.humanRacers.Count > 1)
                {
                    chaseFOV = MathHelper.PiOver2;

                    chasePosition   = new Vector3(0.0f, 2.5f, 12f);
                    chaseFocalPoint = new Vector3(0.0f, 6.0f, 0.0f);

                    chasePosition2   = new Vector3(0.0f, 2f, 10.0f);
                    chaseFocalPoint2 = new Vector3(0.0f, 5.0f, 0f);

                    beatVisHeightOffset = 2f;
                }

                beatVisCamera = new VisCamera(ref properties, getShipPosition, getShipOrientation, getShipUp, beatVisHeightOffset);
                updateBeatVis();

                cameraList.Add(new ChaseCamera(ref properties, getShipPosition, getShipOrientation, getShipUp, racer.shipPhysics.getForwardSpeed, chasePosition2, chaseFocalPoint2, chaseFOV));
                cameraList.Add(new ChaseCamera(ref properties, getShipPosition, getShipOrientation, getShipUp, racer.shipPhysics.getForwardSpeed, chasePosition, chaseFocalPoint, chaseFOV));
                //cameraList.Add(new BumperCamera(ref properties, getShipPosition, getShipOrientation, getShipUp));
                currentCamera = cameraList[cameraID];
            }
            else if (stage == CameraStage.Racing)
            {
                stage++;
            }
        }
Exemplo n.º 2
0
        //Called when the ship/camera is placed on the map,
        public void nextStage()
        {
            if (stage == CameraStage.ShipSelect)
            {
                stage++;

                //If many HUMAN racers at this stage, then screen space limited, so adjust FOV.
                float chaseFOV = ICameraType.defaultFieldOfView;
                Vector3 chasePosition = new Vector3(0.0f, 4.0f, 16.0f);
                Vector3 chaseFocalPoint = new Vector3(0.0f, 1.0f, -40.0f);
                Vector3 chasePosition2 = new Vector3(0.0f, 2.5f, 12f);
                Vector3 chaseFocalPoint2 = new Vector3(0.0f, 1.0f, -30.0f);
                float beatVisHeightOffset = 0f;
                if (Race.humanRacers.Count > 1)
                {
                    chaseFOV = MathHelper.PiOver2;

                    chasePosition = new Vector3(0.0f, 2.5f, 12f);
                    chaseFocalPoint = new Vector3(0.0f, 6.0f, 0.0f);

                    chasePosition2 = new Vector3(0.0f, 2f, 10.0f);
                    chaseFocalPoint2 = new Vector3(0.0f, 5.0f, 0f);

                    beatVisHeightOffset = 2f;
                }

                beatVisCamera = new VisCamera(ref properties, getShipPosition, getShipOrientation, getShipUp, beatVisHeightOffset);
                updateBeatVis();

                cameraList.Add(new ChaseCamera(ref properties, getShipPosition, getShipOrientation, getShipUp, racer.shipPhysics.getForwardSpeed, chasePosition2, chaseFocalPoint2, chaseFOV));
                cameraList.Add(new ChaseCamera(ref properties, getShipPosition, getShipOrientation, getShipUp, racer.shipPhysics.getForwardSpeed, chasePosition, chaseFocalPoint, chaseFOV));
                //cameraList.Add(new BumperCamera(ref properties, getShipPosition, getShipOrientation, getShipUp));
                currentCamera = cameraList[cameraID];
            }
            else if (stage == CameraStage.Racing)
            {
                stage++;
            }
        }