|
@ -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() |
|
|