示例#1
0
    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;
    }
示例#2
0
 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;
     }
 }