diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index 0a455f8..605d411 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -7625,7 +7625,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: -2.8084307} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &8087737910312270468 diff --git a/Assets/Scenes/Vasek.unity b/Assets/Scenes/Vasek.unity index bc8bd5d..6adc5cd 100644 --- a/Assets/Scenes/Vasek.unity +++ b/Assets/Scenes/Vasek.unity @@ -5115,7 +5115,6 @@ MonoBehaviour: - {fileID: 8768991388683709947, guid: 2e18815c9b04872428df50ccfc059d03, type: 3} - {fileID: 8768991388683709947, guid: 99c4e582c7358f346ab00dae4ae956f9, type: 3} - {fileID: 7308296215773848360, guid: 9d0c33f32140d6b4da45d7ecaa694f1b, type: 3} - - {fileID: 1560962678462888388, guid: 8f7d93327dfedaf419b7f63ddb78c6bb, type: 3} - {fileID: 7678802340880963262, guid: c7b1510ab2ab8e349bfaafa501cecb1f, type: 3} - {fileID: 8768991388683709947, guid: 32d2ba4971e4c7e4ab98a1f9c37dcffc, type: 3} - {fileID: 6650340373999088090, guid: 76b3e3235b07ca04f91c9b020603e1dd, type: 3} diff --git a/Assets/Scripts/ProceduralGeneration.cs b/Assets/Scripts/ProceduralGeneration.cs index e0be2da..ad46c96 100644 --- a/Assets/Scripts/ProceduralGeneration.cs +++ b/Assets/Scripts/ProceduralGeneration.cs @@ -179,7 +179,14 @@ public class ProceduralGeneration : MonoBehaviour { if (this.spawnedLevelBlocks.Count < 3) { - blockToSpawn = 10; + blockToSpawn = 9; + } + else + { + if (lastBlockPrefab.name == "platform_rrange" && levelBlocks[blockToSpawn].name != "platform_empty") + { + blockToSpawn = 3; + } } blockObjToSpawn = levelBlocks[blockToSpawn]; @@ -188,13 +195,22 @@ public class ProceduralGeneration : MonoBehaviour } else { - List instantiatedGameObjectLists = this.spawnSpiralOfPlatforms(lastBlock, levelBlocks[0], this.levelParrent); - foreach (var spavnedBlock in instantiatedGameObjectLists) + if (lastBlockPrefab.name == "platform_rrange") { - this.spawnedLevelBlocks.Add(spavnedBlock); + blockObjToSpawn = levelBlocks[3]; + instantiatedGameObject = this.drawPlatform(this.lastBlock, this.levelBlocks[3], this.levelParrent); + this.spawnedLevelBlocks.Add(instantiatedGameObject); + } + else + { + List instantiatedGameObjectLists = this.spawnSpiralOfPlatforms(lastBlock, levelBlocks[0], this.levelParrent); + foreach (var spavnedBlock in instantiatedGameObjectLists) + { + this.spawnedLevelBlocks.Add(spavnedBlock); + } + instantiatedGameObject = this.spawnedLevelBlocks[this.spawnedLevelBlocks.Count - 1]; + blockObjToSpawn = levelBlocks[0]; } - instantiatedGameObject = this.spawnedLevelBlocks[this.spawnedLevelBlocks.Count - 1]; - blockObjToSpawn = levelBlocks[0]; } this.lastBlock = instantiatedGameObject;