aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2019-04-27 20:27:35 +0200
committermarcinzelent <zelent.marcin@gmail.com>2019-04-27 20:27:35 +0200
commita227d09d68187f80d620e2021be2c84979498710 (patch)
tree476510dc4f2358cfa0fe743fafe08976ea55a94c /nGJ2019/Assets/Scripts/ObstacleSpawner.cs
parent8973398675a1ea012da316f791448d9437fc8528 (diff)
Fixed messaging breaking spawning
Diffstat (limited to 'nGJ2019/Assets/Scripts/ObstacleSpawner.cs')
-rw-r--r--nGJ2019/Assets/Scripts/ObstacleSpawner.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/nGJ2019/Assets/Scripts/ObstacleSpawner.cs b/nGJ2019/Assets/Scripts/ObstacleSpawner.cs
index f438e85..0e6b3ac 100644
--- a/nGJ2019/Assets/Scripts/ObstacleSpawner.cs
+++ b/nGJ2019/Assets/Scripts/ObstacleSpawner.cs
@@ -8,7 +8,6 @@ public class ObstacleSpawner : MonoBehaviour
public GameObject caveWallsPrefab, rockTopPrefab, rockBottomPrefab, narrowPassagePrefab, rockJawsPrefab;
public LevelScrolling scrolling;
- public Messenger messenger;
public float spawnLine;
@@ -35,8 +34,8 @@ public class ObstacleSpawner : MonoBehaviour
break;
}
- var transformT = ((GameObject)Instantiate(prefab, new Vector3(spawnLine, e.height, 0), Quaternion.identity)).transform;
- scrolling.Obstacles.Add(transformT);
+ var o = Instantiate(prefab, new Vector3(spawnLine, e.height, 0), Quaternion.identity);
+ scrolling.Obstacles.Add(o);
}
void Start()