+ Marry building system with world terrain - phase 1

This commit is contained in:
tetreum
2021-02-28 11:52:56 +01:00
parent ab599a77c3
commit a6254cb262
15 changed files with 602 additions and 636 deletions

View File

@@ -83,6 +83,7 @@ namespace Brickcraft
public const float brickWidth = 0.796f; // 2x2
public GameObject[] prefabs;
public GameObject playerPrefab;
void Awake() {
Instance = this;
@@ -97,6 +98,10 @@ namespace Brickcraft
}
}
public void spawnPlayer () {
Instantiate(playerPrefab, new Vector3(0, 160, 0), Quaternion.identity);
}
void processPrefabs() {
foreach (var prefab in prefabs) {
brickPrefabs.Add(prefab.name, prefab);