void Start() { _internalPrefab = prefab; effects = new List <EffectInfo>(); deprimuses = new List <Deprimus>(); prefabRenderer = _internalPrefab.GetComponent <Renderer>(); clock = 0f; Player player = FindObjectOfType <Player>(); Camera camera = FindObjectOfType <Camera>(); spawnLimits = new Limits(); spawnLimits.left = -camera.orthographicSize * camera.aspect + prefabRenderer.bounds.size.x / 2f; spawnLimits.right = camera.orthographicSize * camera.aspect - prefabRenderer.bounds.size.x / 2f; spawnLimits.top = BrickManager.GetTopLimit() - prefabRenderer.bounds.size.y / 2f; spawnLimits.bottom = player.transform.position.y + player.GetComponent <Renderer>().bounds.size.y / 2f + prefabRenderer.bounds.size.y / 2f; actualSpawnProb = SPAWN_PROB_PER_SEC; }