protected override void PlatformPlacementLogic(Transform platform) { if (Random.value < chanceToPlaceItems && !PlatformsPlacedOnThisFrame.Contains(platform)) { var item = Items[Random.Range(0, Items.Length)]; PlacePlatformObject(item, platform); } }
protected override void PlatformPlacementLogic(Transform platform) { var index = Random.Range(0, Obstacles.Length); var obstacle = Obstacles[index]; //Chance to place if (Random.value <= obstacle.SpawnChance && !PlatformsPlacedOnThisFrame.Contains(platform)) { //Only place on right platforms if (obstacle.PlacementMask == string.Empty || platform.name == obstacle.PlacementMask) { PlacePlatformObject(obstacle, platform); } } }