private void OnTriggerExit(Collider other) { c = FindObjectOfType <camerafollow>(); c.offset = new Vector3(0f, 2f, -10f); play.movespeed = 10f; play.movement(); }
private void OnTriggerEnter(Collider other) { c = FindObjectOfType <camerafollow>(); c.offset = new Vector3(0f, 1f, -5f); play = FindObjectOfType <Player>(); play.movespeed = 6f; play.movement(); }
// Use this for initialization void Start() { opening = false; i = 0; player = GameObject.FindGameObjectWithTag("Player"); controller = GameObject.Find("Initialiser").GetComponent <GeneralController>(); maincamerafollow = GameObject.Find("Main Camera").GetComponent <camerafollow>(); }
public override void OnInspectorGUI() { DrawDefaultInspector(); camerafollow of = (camerafollow)target; if (GUILayout.Button("Set Min Cam Pos")) { of.setmincampos(); } if (GUILayout.Button("Set Max Cam Pos")) { of.setmaxcampos(); } }
private void Start() { cam = GameObject.Find("Main Camera").GetComponent <camerafollow>(); }
// Use this for initialization void Start() { cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); camfol = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <camerafollow>(); ppp = GameObject.FindGameObjectWithTag("Player"); }