private void AdjustPlatformSize() { var lowestShape = _currentLevel.GetShapeConfig(0); float shapeDiameter = lowestShape.SideLength / Mathf.Sin(Mathf.Deg2Rad * (180f / lowestShape.Sides)); _platform.localScale = new Vector3(shapeDiameter, _platform.localScale.y, shapeDiameter); }
private void SpawnFloor(int level) { var floor = new TowerFloor(_currentLevel.GetShapeConfig(level), _towerParent, level, _currentLevel.GetAngle(level)); floor.InstantiateFloor(_cylinderPrefab); floor.OnCylinderRemoved += RemoveCylinder; _towerFloors.Add(floor); }