void Start() { SectionDivider = Instantiate(SectionDividerPrefab) as GameObject; SectionDivider.SetActive(false); WallPool = FindObjectOfType <WallPooling> (); WSpawner = FindObjectOfType <WallSpawner> (); HazPool = FindObjectOfType <HazardPool> (); LastWallSpawnerPos = WSpawner.gameObject.transform.position; }
void Start() { wallIndexesToRemove = new List <int> (); newPosition = new Vector3(transform.position.x, 0, 0); SpawnOffset = new Vector3(0, 7, 0); pool = GetComponent <WallPooling> (); ActiveWalls = new List <GameObject> (); BuildAWall(); }
private void Awake() { Instance = this; }