示例#1
0
    private void Start()
    {
        TileList.Init();
        TileHolder.Init();

        Rect          camR     = Utils.CameraRect();
        Rect          listR    = TileList.CalculateWorldRect();
        BoxCollider2D colldier = GetComponent <BoxCollider2D>();

        float width  = TileHolder.Width;
        float height = camR.height - TileHolder.Height;

        transform.position = new Vector3(listR.xMax + width / 2, listR.yMax - height / 2);
        colldier.size      = new Vector2(width, height);
    }