aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'nGJ2019/Assets/Scripts')
-rw-r--r--nGJ2019/Assets/Scripts/ObstacleSpawner.cs35
-rw-r--r--nGJ2019/Assets/Scripts/TitleScreen.cs2
2 files changed, 29 insertions, 8 deletions
diff --git a/nGJ2019/Assets/Scripts/ObstacleSpawner.cs b/nGJ2019/Assets/Scripts/ObstacleSpawner.cs
index bea85b2..84bc0d9 100644
--- a/nGJ2019/Assets/Scripts/ObstacleSpawner.cs
+++ b/nGJ2019/Assets/Scripts/ObstacleSpawner.cs
@@ -1,4 +1,5 @@
-using System.Collections;
+using System;
+using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -73,14 +74,34 @@ public class ObstacleSpawner : MonoBehaviour
}
else if (scene.name == "Level1")
{
+ System.Random random = new System.Random();
for (int i = 0; i < 1000; i++)
{
- timeline.Add(i * 2.5f, new Vector3(0, 0, 0), ObstacleType.caveWalls);
- timeline.Add(i * 12.5f + 3, new Vector3(0, 2.75f, 0), ObstacleType.rockTop);
- timeline.Add(i * 12.5f + 6, new Vector3(0, -2, 0), Obst