示例#1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
    private void Awake()
    {
        instance = this;

        _minLimitX = leftCollider.bounds.size.x / 2 + leftCollider.transform.position.x;
        _maxLimitX = rightCollider.transform.position.x - rightCollider.bounds.size.x / 2;

        _outerMaxLimitX = rightCollider.transform.position.x + rightCollider.bounds.size.x / 2;
        _outerMinLimitX = leftCollider.transform.position.x - leftCollider.bounds.size.x / 2;
    }
示例#3
0
 void Awake()
 {
     if (instance == null) {
         instance = this;
     }
 }