Esempio 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;
                }
            }
        }
Esempio 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());
        }
 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;
                }
            }
        }
 public void ResetCamera()
 {
     camera      = null;
     cameraCurve = null;
 }
 public void SetCamera( MapObject cameraOrCameraCurve )
 {
     camera = cameraOrCameraCurve as MapCamera;
     cameraCurve = cameraOrCameraCurve as MapCameraCurve;
     if( cameraCurve != null )
         cameraCurveTime = cameraCurve.GetCurveTimeRange().Minimum;
     oldCameraCurveTime = cameraCurveTime;
 }
 public void ResetCamera()
 {
     camera = null;
     cameraCurve = null;
 }
        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;
            }
        }