void Start() { cam = gameObject.GetComponent <Camera>(); size = cam.orthographicSize; joueur = GameObject.FindGameObjectWithTag("Player"); follow = true; infoCam = new S_InfoCam(size, decalage, smoothTime, smoothTimeSize); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("Player") && !allReadyFocus) { cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraMvmt>(); info = cam.infoCam; print(info.size); cam.FocusEnable(position, smoothPosition, size, smoothTimeSize); allReadyFocus = true; } }
public void FocusDisable(S_InfoCam info) { infoCam = info; follow = true; }