Esempio n. 1
0
        public void InitCamera()
        {
            Vector2d start = Rider.Create(
                _track.StartOffset,
                Vector2d.Zero,
                _track.Remount).CalculateCenter();//avoid a timeline query

            if (Camera != null)
            {
                Camera.BeginFrame(1, Zoom);
                start = Camera.GetCenter(true);
            }
            if (Settings.SmoothCamera)
            {
                if (Settings.PredictiveCamera)
                {
                    Camera = new PredictiveCamera();
                }
                else
                {
                    Camera = new SoftCamera();
                }
            }
            else
            {
                Camera = new ClampCamera();
            }
            Camera.SetTimeline(Timeline);
            Camera.SetFrameCenter(start);
        }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        Transform player = GameObject.FindWithTag("Player").transform;

        navComponent = (NavMeshAgent)player.transform.GetComponent("NavMeshAgent");
        clampCamera  = (ClampCamera)GetComponent("ClampCamera");
    }
Esempio n. 3
0
    void Start()
    {
        target = GameObject.FindWithTag("Player").transform;

        clampCamera = (ClampCamera)GetComponent("ClampCamera");

        viewDrag = (ViewDrag)GetComponent("ViewDrag");
    }
Esempio n. 4
0
 void Start()
 {
     Debug.Log("changeClamp start");
     ccObj = Camera.main.GetComponent <ClampCamera>();
     Debug.Log("cameraOnRight: " + cameraOnRight);
     if (cameraOnRight && SaveLoadSystem.getInstance().atriumSceneStateArr[(int)SaveLoadSystem.AtriumSceneState.FROMLG2])
     {
         Debug.Log("Load camera");
         moveToLeft();
         ccObj.setClamp();
     }
 }
Esempio n. 5
0
 public void SetClampInfo(ClampCamera info)
 {
     clamp = info;
 }