Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     cameraManager.UpdateScreenBounds(transform, Camera.main);
     if (SceneManager.GetActiveScene().name == "Game")
     {
         rightPlank.transform.position = new Vector3(CameraManager.ScreenRightBound() + 1f, rightPlank.transform.position.y);
         leftPlank.transform.position  = new Vector3(CameraManager.ScreenLeftBound() - 1f, leftPlank.transform.position.y);
     }
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     go = GameObject.Find("Cube");
     go.transform.position = new Vector3(CameraManager.ScreenRightBound() - 1, go.transform.position.y, go.transform.position.z);
 }