private void Awake() { // Setting up references. characterAnimator = GetComponent <Animator>(); rigidBody2D = GetComponent <Rigidbody2D>(); audioSource = GetComponent <AudioSource>(); startPosition = transform.position; timeManager = GameObject.Find("Main Camera").GetComponent <TimeManager>(); boostRespawn = GameObject.Find("BoostSpawner").GetComponent <BoostRespawn>(); }
private void Awake() { // Setting up references. m_GroundCheck = transform.Find("GroundCheck"); m_LeftCheck = transform.Find("GroundCheck (1)"); m_RightCheck = transform.Find("GroundCheck (2)"); m_CeilingCheck = transform.Find("CeilingCheck"); m_Anim = GetComponent <Animator>(); m_Rigidbody2D = GetComponent <Rigidbody2D>(); audioSource = GetComponent <AudioSource>(); startPosition = transform.position; timeManager = GameObject.Find("Main Camera").GetComponent <TimeManager>(); boostRespawn = GameObject.Find("BoostSpawner").GetComponent <BoostRespawn>(); }
// Upon initialize of the level, load the instance and spawn the first set of boosts void Start() { Instance = this; SpawnBoost(); }