This commit is contained in:
2023-04-29 17:07:23 +02:00
parent 2f4caf9a07
commit 25d792e0fd
10 changed files with 6875 additions and 72 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 45f19baf5179cf745ba619186f664b9e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7fd43fea6e592be348af51e93185cf90
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 801674bb4f54353d3966591ac2876a92
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8500f6075c56d47809b2a1e2dfb10d39
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.5615895, g: 0.72180885, b: 0.81785697, a: 1}
m_IndirectSpecularColor: {r: 0.56158954, g: 0.7218083, b: 0.8178571, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@@ -3276,6 +3276,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
loadFrom: []
sideObjects: []
sideObjectsSpawned: []
materials:
- {fileID: 2100000, guid: 97cabee3711df3b4b944878d6d30edda, type: 2}
- {fileID: 2100000, guid: 197ee10712c66054cb2f88781c8d94f4, type: 2}
@@ -12409,6 +12410,10 @@ PrefabInstance:
propertyPath: m_TagString
value: Floor
objectReference: {fileID: 0}
- target: {fileID: 7191957008091885843, guid: d73ae45b499e5f74ba3e0d287b87893c, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 97cabee3711df3b4b944878d6d30edda, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d73ae45b499e5f74ba3e0d287b87893c, type: 3}
--- !u!1 &5948498191493442793

View File

@@ -7,9 +7,11 @@ public class GroundController : MonoBehaviour
private GameObject[] ground;
public GameObject[] loadFrom;
public GameObject[] sideObjects;
public GameObject[] sideObjectsSpawned;
public Material[] materials;
public int materialIndex = 0;
public float groundMoveSpeed = 10f;
private Vector3 lastSideObjectPos = new Vector3(0,0,0);
//private CollectibleSpawner cs;
@@ -18,7 +20,7 @@ public class GroundController : MonoBehaviour
//Loading modules
loadFrom = LoadPrefabs("Prefabs/Modulok");
sideObjects = LoadPrefabs("Models/World Objects/World 1");
sideObjects = LoadPrefabs("Prefabs/World Objects/World 1");
Debug.Log("loadFrom length: " + loadFrom.Length);
Debug.Log("sideObjects Length: " + sideObjects.Length);
@@ -42,6 +44,7 @@ public class GroundController : MonoBehaviour
//uj ground letrehozas
if(ground[ground.Length-1].transform.position.z <= 120){
CreateNewGround();
CreateNewSideObjects();
ground = GameObject.FindGameObjectsWithTag("Ground");
@@ -79,6 +82,12 @@ public class GroundController : MonoBehaviour
return arr;
}
private void CreateNewSideObjects(){
int random = UnityEngine.Random.Range(0, sideObjects.Length);
Instantiate(sideObjects[random], lastSideObjectPos + new Vector3(0,0,20), ground[0].transform.rotation);
}
public void changeMaterialIndex(){
}