Ejemplo n.º 1
0
 void Start()
 {
     smoothCameraPlanet = mainCamera.GetComponent<SmoothCameraPlanet>();
     smoothCameraPlanet.target = null;
     smoothCameraSpace = mainCamera.GetComponent<SmoothCameraSpace>();
     smoothCameraSpace.target = null;
     mainCamera.transform.parent = null;
     mainCamera.transform.position = new Vector3(transform.position.x, transform.position.y, -200f);
     mainCamera.transform.rotation = Quaternion.Euler(Vector3.zero);
     otherPlayerTransform = transform;
 }
Ejemplo n.º 2
0
 void Start()
 {
     if (isLocalPlayer)
     {
         smoothCameraPlanet = mainCamera.GetComponent<SmoothCameraPlanet>();
         smoothCameraPlanet.target = null;
         smoothCameraSpace = mainCamera.GetComponent<SmoothCameraSpace>();
         smoothCameraSpace.target = null;
         mainCamera.transform.parent = null;
         mainCamera.transform.position = new Vector3(transform.position.x, transform.position.y, -200f);
         mainCamera.transform.rotation = Quaternion.Euler(Vector3.zero);
         StartCoroutine("GetOtherPlayerTransform");
     }
     else
     {
         Destroy(mainCamera);
     }
 }