Inheritance: MonoBehaviour
Exemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         CamSwitcher.FetchSwitchCam(newCam);
     }
 }
Exemplo n.º 2
0
 // Warp player to linked door and switch cameras when clicked
 private void OnMouseUpAsButton()
 {
     if (interactable)
     {
         CamSwitcher.SwitchTo(otherCamera);
         playerAgent.Warp(otherSide.transform.position);
     }
 }
Exemplo n.º 3
0
    public static void FetchSwitchCam(Camera newCam)
    {
        CamSwitcher cs = GameObject.FindGameObjectWithTag("CamSwitcher").GetComponent <CamSwitcher>();

        if (cs)
        {
            cs.SwitchCamera(newCam);
        }
    }
Exemplo n.º 4
0
 void Awake()
 {
     if (I == null)
     {
         I = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 5
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            GameObject oldScreen = other.transform.parent.gameObject;

            other.SendMessage("SetRespawn", respawnPt.transform.position);
            other.transform.parent = transform.parent;
            CamSwitcher.FetchSwitchCam(orthCam);
            gate.gameObject.SetActive(true);
            gameObject.SetActive(false);

            oldScreen.SendMessage("StopScreen");
            SendMessageUpwards("StartScreen");
        }
    }
Exemplo n.º 6
0
 void Start()
 {
     cs = GameObject.Find("CamSwitcher").GetComponent <CamSwitcher>();
 }