private void Start() { score = 0; spawn = false; GameObject currentBird = Object.Instantiate(birdPrefab, spawnLocation.position, spawnLocation.rotation); slingShotLine.setCurrentBird(currentBird); slingShotLine.setLineRendererActive(active: true); birdsFired = 1; }
private void Start() { slingShotLine.setCurrentBird(gameObject); rb.constraints = RigidbodyConstraints2D.FreezeAll; releaseDelay = 1 / (sj.frequency * 4); slingShotLine.setLineRendererActive(true); isPressed = false; }
private IEnumerator Release() { looseSoundEffect.Play(); yield return(new WaitForSeconds(releaseDelay)); sj.enabled = false; gameManager.setBool(set: true); slingShotLine.setLineRendererActive(active: false); particleSystemTracer.Play(); StartCoroutine(cameraMovement.moveCamera()); StartCoroutine(backGroundParallax.movebackground()); }