Exemple #1
0
 private void SetBounds()
 {
     bounds[0].transform.position = new Vector2(-CameraOptimize.ComputeResolution().Item1 / 2, 0);
     bounds[1].transform.position = new Vector2(CameraOptimize.ComputeResolution().Item1 / 2, 0);
     bounds[2].transform.position = new Vector2(0, -CameraOptimize.ComputeResolution().Item2 / 2);
     bounds[3].transform.position = new Vector2(0, CameraOptimize.ComputeResolution().Item2) / 2;
 }
    public void Start()
    {
        float x, y;

        x = CameraOptimize.ComputeResolution().Item1;
        y = CameraOptimize.ComputeResolution().Item2;
        model.SetBound(-x / 2 + 0.8f, x / 2 - 0.8f, -y / 2 + 0.8f, y / 2 - 0.8f);
        model.Speed = 10f;
        model.SetView(view);
    }