protected void CreateObstacle() { CreateObstacleTerrain obstacle = creationManager.GetComponent <CreateObstacleTerrain>(); ReplaceParametersWithDMWidth(ref minStart.z, ref maxStart.z); // Use height instead of maxHeight so obstacle is never greater than ramp size obstacle.BuildObstacle(minStart, maxStart, minLength, maxLength, minWidth, maxWidth, minHeight, height, prefabListObstacles, scenarioParent, rng); }
protected void CreateScenarioWall() { //CreateObstacleTerrain obstacle = creationManager.GetComponent<CreateObstacleTerrain>(); CreateObstacleTerrain obstacle = new CreateObstacleTerrain(); obstacle.BuildObstacle(minStart, maxStart, minLength, maxLength, scenarioWidth, scenarioWidth, height, height + 1.0f, prefabListObstacles, scenarioParent, rng); Vector3 placement = new Vector3(effectiveScenarioLength - obstacle.Length, 0.0f, obstacle.Width / 2); obstacle.GeneratedObstacle.transform.localPosition = placement; }