예제 #1
0
    void BuildGround()
    {
        Obstacle o = groundPool.RequestFreeObstacle(ObstacleHeap);

        if (o == null)
        {
            nextGroundLenght += 2f; return;
        }
        o.transform.position = new Vector3(nextGroundLenght, groundHeight + o._yHeightOffGround);
        nextGroundLenght    += o._width;
        o.ActiveObstacle     = true;
    }