void Start()
{
LeftBorder = Camera.main.ViewportToWorldPoint(new Vector3(0, 0)).x;
RightBorder = Camera.main.ViewportToWorldPoint(new Vector3(1, 0)).x;
sp = GetComponent<SpriteRenderer>();
} player类要记得添加这一句
void Start()
{
LeftBorder = Camera.main.ViewportToWorldPoint(new Vector3(0, 0)).x;
RightBorder = Camera.main.ViewportToWorldPoint(new Vector3(1, 0)).x;
sp = GetComponent<SpriteRenderer>();
} player类要记得添加这一句