Changed spawn to be dynamically created

This commit is contained in:
TAASONI3
2023-11-25 22:00:58 +01:00
parent b9aa033c13
commit 509c207d32
5 changed files with 80 additions and 1486 deletions

View File

@@ -146,24 +146,6 @@ public class Tile : MonoBehaviour
}
}
public void resetSpawn()
{
foreach (Rigidbody rigid in gameObject.GetComponentsInChildren<Rigidbody>())
{
rigid.useGravity = true;
}
foreach (Renderer rend in gameObject.GetComponentsInChildren<Renderer>())
{
rend.enabled = true;
}
foreach (Collider col in gameObject.GetComponentsInChildren<Collider>())
{
col.enabled = true;
}
}
public bool enteredTile(float playerX, float playerZ)
{
bool result = false;