Portal fix

Portál spawnolása fixálva, illetve a színváltás is 99%
This commit is contained in:
bance
2023-05-11 18:39:46 +02:00
parent f4aaf4c72f
commit 1f8734a95e
4 changed files with 66 additions and 49 deletions

View File

@@ -80,16 +80,17 @@ public class GroundController : MonoBehaviour
}
public void changeMaterialIndex(){
int materialteszt = UnityEngine.Random.Range(0, materials.Length);
Debug.Log(materialteszt);
int materialteszt;
bool teszteljtovabb = true;
while (teszteljtovabb == true)
{
materialteszt = UnityEngine.Random.Range(0, materials.Length);
Debug.Log(materialteszt);
if (materialteszt == materialIndex)
{
}
else
{
@@ -97,7 +98,9 @@ public class GroundController : MonoBehaviour
teszteljtovabb = false;
}
}
teszteljtovabb = true;
}
private bool CheckGroundToDestroy(GameObject toCheck){