Browse Source

Main level

main
Joshua 1 year ago
parent
commit
d13751bf33
3 changed files with 22 additions and 3 deletions
  1. BIN
      Assets/Scenes/Main.unity
  2. +7
    -0
      Assets/Scenes/Main.unity.meta
  3. +12
    -3
      Assets/Scripts/Route/TileManager.cs

BIN
Assets/Scenes/Main.unity (Stored with Git LFS) View File

size 65091

+ 7
- 0
Assets/Scenes/Main.unity.meta View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e913910dbb8a03f4aa58bb1712b2e5c2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 12
- 3
Assets/Scripts/Route/TileManager.cs View File

@ -8,7 +8,8 @@ public class TileManager : MonoBehaviour
private List<TileData> m_tileList = new List<TileData>(); private List<TileData> m_tileList = new List<TileData>();
[SerializeField] [SerializeField]
private Transform m_camTransform;
private int trackTiles = 10;
private int m_bendProfile = 0; private int m_bendProfile = 0;
@ -26,6 +27,13 @@ public class TileManager : MonoBehaviour
private void Start() private void Start()
{ {
m_currentTile = FindObjectOfType<TileController>(); m_currentTile = FindObjectOfType<TileController>();
for (int i = 0; i < trackTiles; i++)
{
SpawnRandomTile();
}
} }
// Update is called once per frame // Update is called once per frame
@ -43,10 +51,11 @@ public class TileManager : MonoBehaviour
} }
*/ */
if(Input.GetKeyDown(KeyCode.Space))
/*if(Input.GetKeyDown(KeyCode.Space))
{ {
SpawnRandomTile(); SpawnRandomTile();
}
}*/
} }
void SpawnRandomTile() void SpawnRandomTile()

Loading…
Cancel
Save