Ejemplo n.º 1
0
        private void GetMapCurve(out MapCameraCurve outCurve, out float outCurveTime)
        {
            outCurve     = null;
            outCurveTime = 0;
            float remainingTime = moveTime;

            //float addedtime = 0;

            //iNCIN
            foreach (MapCameraCurve curve in cameraCurves)
            {
                float length = curve.GetCurveMaxTime();
                if (remainingTime <= length)
                {
                    outCurve     = curve;
                    outCurveTime = remainingTime;
                    return;
                }
                remainingTime -= length;

                if (remainingTime < 0)
                {
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private void GenerateCameraCurvesList()
        {
            //cameraCurves
            cameraCurves = new List <MapCameraCurve>();
            foreach (Entity entity in Map.Instance.Children)
            {
                MapCameraCurve curve = entity as MapCameraCurve;
                if (curve != null)
                {
                    cameraCurves.Add(curve);
                }
            }
            ListUtils.SelectionSort(cameraCurves, delegate(MapCameraCurve curve1, MapCameraCurve curve2)
            {
                return(string.Compare(curve1.Name, curve2.Name));
            });

            cameraCurvesTotalTime = 0;
            foreach (MapCameraCurve curve in cameraCurves)
            {
                //curveTime += curve.Time;
                cameraCurvesTotalTime += curve.GetCurveMaxTime();
            }

            //EngineConsole.Instance.Print("CurveTime = " + curveTime.ToString() + " cameraCurvesTotalTime = "  + cameraCurvesTotalTime.ToString());
        }
Ejemplo n.º 3
0
 public void SetCamera(MapObject cameraOrCameraCurve)
 {
     camera      = cameraOrCameraCurve as MapCamera;
     cameraCurve = cameraOrCameraCurve as MapCameraCurve;
     if (cameraCurve != null)
     {
         cameraCurveTime = cameraCurve.GetCurveTimeRange().Minimum;
     }
     oldCameraCurveTime = cameraCurveTime;
 }
        private void GetDemoModeMapCurve(out MapCameraCurve outCurve, out float outCurveTime)
        {
            outCurve = null;
            outCurveTime = 0;

            float remainingTime = demoModeTime;

            foreach (MapCameraCurve curve in cameraCurves)
            {
                float length = curve.GetCurveMaxTime();
                if (remainingTime < length)
                {
                    outCurve = curve;
                    outCurveTime = remainingTime;
                    return;
                }
                remainingTime -= length;
                if (remainingTime < 0)
                    break;
            }
        }
        void GetDemoModeMapCurve(out MapCameraCurve outCurve, out float outCurveTime)
        {
            outCurve     = null;
            outCurveTime = 0;

            float remainingTime = demoModeTime;

            foreach (MapCameraCurve curve in cameraCurves)
            {
                float length = curve.GetCurveMaxTime();
                if (remainingTime < length)
                {
                    outCurve     = curve;
                    outCurveTime = remainingTime;
                    return;
                }
                remainingTime -= length;
                if (remainingTime < 0)
                {
                    break;
                }
            }
        }
Ejemplo n.º 6
0
 public void ResetCamera()
 {
     camera      = null;
     cameraCurve = null;
 }
Ejemplo n.º 7
0
 public void SetCamera( MapObject cameraOrCameraCurve )
 {
     camera = cameraOrCameraCurve as MapCamera;
     cameraCurve = cameraOrCameraCurve as MapCameraCurve;
     if( cameraCurve != null )
         cameraCurveTime = cameraCurve.GetCurveTimeRange().Minimum;
     oldCameraCurveTime = cameraCurveTime;
 }
Ejemplo n.º 8
0
 public void ResetCamera()
 {
     camera = null;
     cameraCurve = null;
 }
Ejemplo n.º 9
0
        private void GetMapCurve(out MapCameraCurve outCurve, out float outCurveTime)
        {
            outCurve = null;
            outCurveTime = 0;
            float remainingTime = moveTime;
            //float addedtime = 0;

            //iNCIN
            foreach (MapCameraCurve curve in cameraCurves)
            {
                float length = curve.GetCurveMaxTime();
                if (remainingTime <= length)
                {
                    outCurve = curve;
                    outCurveTime = remainingTime;
                    return;
                }
                remainingTime -= length;

                if (remainingTime < 0)
                    break;
            }
        }