// Start is called before the first frame update void Start() { if (Physics.gravity.y > -10) { Physics.gravity *= gravityModifier; } playerAudio = GetComponent <AudioSource>(); playerRb = GetComponent <Rigidbody>(); scoreRef = GameObject.FindGameObjectWithTag("GameController").GetComponent <ScoreManagerX>(); // Apply a small upward force at the start of the game playerRb.AddForce(Vector3.up * 5, ForceMode.Impulse); }
// Start is called before the first frame update void Start() { scoreRef = GameObject.FindGameObjectWithTag("GameController").GetComponent <ScoreManagerX>(); InvokeRepeating("SpawnObjects", spawnDelay, spawnInterval); }
// Start is called before the first frame update void Start() { scoreRef = GameObject.FindGameObjectWithTag("GameController").GetComponent <ScoreManagerX>(); }