ground bug fixed

This commit is contained in:
2023-02-28 13:31:31 +01:00
parent f594e3e415
commit 1cf316e00c
4 changed files with 55 additions and 31 deletions

View File

@@ -9,7 +9,7 @@ public class GroundController : MonoBehaviour
public GameObject[] sideObjects;
public float groundMoveSpeed = 10f;
private CollectibleSpawner cs;
//private CollectibleSpawner cs;
private void Awake() {
//cs = FindObjectOfType<CollectibleSpawner>();
@@ -83,6 +83,6 @@ public class GroundController : MonoBehaviour
private void CreateNewGround(){
int random = UnityEngine.Random.Range(0, loadFrom.Length);
//ketto modullal elobb tolt be, annak az iranyanak megfeleloen, +80 a ket modull hossza
Instantiate(loadFrom[random], new Vector3(0,0, ground[ground.Length-2].transform.position.z + 80), ground[ground.Length-2].transform.rotation);
Instantiate(loadFrom[random], new Vector3(0,0, ground[ground.Length-1].transform.position.z + 40), ground[ground.Length-1].transform.rotation);
}
}