// Use this for initialization void Start() { CheckPointSaver checkPoint = GameObject.FindGameObjectWithTag("Respawn").GetComponent <CheckPointSaver>(); transform.position = checkPoint.getCheckPointPosition(); if (transform.position.y > 3) { GetComponent <PortalGun> ().enabled = true; offhand.SetActive(true); } GameObject.FindWithTag("MainCamera").transform.position = checkPoint.getCameraPosition(); }
// Use this for initialization void Start() { checkPointScript = GameObject.FindWithTag("Respawn").GetComponent <CheckPointSaver> (); }