// Start is called before the first frame update void Start() { _gm = GameObject.Find("Game Manager").GetComponent <GameManagerX3>(); playerAudio = GetComponent <AudioSource>(); playerRb = GetComponent <Rigidbody>(); // Apply a small upward force at the start of the game //playerRb.AddForce(Vector3.up * 2, ForceMode.Impulse); explosionParticle.Stop(); fireworksParticle.Stop(); }
// Start is called before the first frame update void Start() { _gm = GameObject.Find("Game Manager").GetComponent <GameManagerX3>(); startPos = transform.position; // Establish the default starting position repeatWidth = GetComponent <BoxCollider>().size.x / 2; // Set repeat width to half of the background }
// Start is called before the first frame update void Start() { _gm = GameObject.Find("Game Manager").GetComponent <GameManagerX3>(); InvokeRepeating("SpawnObjects", spawnDelay, spawnInterval); playerControllerScript = GameObject.Find("Player").GetComponent <PlayerControllerX3>(); }
// Start is called before the first frame update void Start() { _gm = GameObject.Find("Game Manager").GetComponent <GameManagerX3>(); speed += _gm.wave; playerControllerScript = GameObject.Find("Player").GetComponent <PlayerControllerX3>(); }