ground bug fixed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/WallCollision.cs
Normal file
13
Assets/Scripts/WallCollision.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class WallCollision : MonoBehaviour
|
||||
{
|
||||
private void OnTriggerEnter(Collider other) {
|
||||
if(other.gameObject.tag == "Player"){
|
||||
Debug.Log("neki ment a falnak");
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/WallCollision.cs.meta
Normal file
11
Assets/Scripts/WallCollision.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c504cad2318bb1e33bb50a99fd60a73f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user