void Update() { var p = transform.position; p.x = x + SmoothCamera.Parallax(SmoothCamera.camT.position.x, SmoothCamera.camT.position.y, myStreet.transform.position.y - myStreet.StreetYOffset - amount); transform.position = p; }
void Update() { if (rootStreet) { var p = transform.position; p.x = SmoothCamera.Parallax(SmoothCamera.camT.position.x, SmoothCamera.camT.position.y, transform.position.y - StreetYOffset); transform.position = p; } }