Inheritance: MonoBehaviour
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.tag == "MainCamera")
        {
            Debug.Log("Changing Camera!");

            camMove move = Camera.main.GetComponent <camMove>();

            //move.SetRotation(rotate, rotateTime, rotateSpeed, rotateDirection);
            //move.SetMovement(move, moveDirection, moveSpeed);
        }
    }
Beispiel #2
0
 void Start()
 {
     transform.name     = "Player";
     transform.position = new Vector3(600.0f, 400.0f, -500.0f);
     if (!isLocalPlayer)
     {
         transform.name      = "Player2";
         playCameraTransform = transform.Find("Main Camera");
         playerCamera        = playCameraTransform.GetComponent <Camera>();
         playControl         = GetComponent <PlayerControl>();
         cammove             = GetComponent <camMove>();
         if (playerCamera)
         {
             playerCamera.enabled = false;
         }
         if (cammove)
         {
             cammove.enabled = false;
         }
     }
 }