示例#1
0
    protected void CreateWallToObstacle(WallObstacle o)
    {
        Vector2             offset   = new Vector2(wallLengthDone, 0);
        Vector3             wallSize = new Vector3(wallThickness, wallHeight, o.bottomLeftAnchorPosition.x - wallLengthDone);
        AdvancedCubeBuilder b        = new AdvancedCubeBuilder(MaxSize, wallSize, offset, transform, m);

        HandleCreatedWall(b);
    }
示例#2
0
    protected void CreateWallOverObstacle(WallObstacle o)
    {
        float upperYPos = Mathf.Clamp(o.bottomLeftAnchorPosition.y + o.obstacleSize.y, 0, wallHeight);

        if (upperYPos < wallHeight)
        {
            Vector2 offset   = new Vector2(wallLengthDone, upperYPos);
            Vector3 wallSize = new Vector3(
                wallThickness,
                wallHeight - upperYPos,
                o.bottomLeftAnchorPosition.x - wallLengthDone + o.obstacleSize.x);
            AdvancedCubeBuilder b = new AdvancedCubeBuilder(MaxSize, wallSize, offset, transform, m);
            HandleCreatedWall(b);
        }
    }
示例#3
0
 protected void HandleCreatedWall(AdvancedCubeBuilder b)
 {
     wallParts.Add(b);
     b.Build();
 }