CletusController playerScript; //reference to player's movement script. void Awake() { //set up references playerScript = GetComponent <CletusController> (); //source = GetComponent<AudioSource>(); //reference to walkinDude's audioSource Component //set initial stats //bool isDead; //deadWithdrawal = false; //deadBloodPoisoning = false; //currentVenom = startVenom; //currentHP = startTolerance; //set timers //venomFadeTimer = venomTimerMax; //tolTimer = tolTimerMax; //blackoutTimer = blackoutFrequencyMax / 2; spinBgScript = GameObject.Find("BG").GetComponent <RotateBackground>(); }
void Awake() { camera = GameObject.FindGameObjectWithTag("MainCamera"); //ref to camera extAudio = camera.GetComponent <ExternalAudio>(); //ref to camera's ExternalAudio Script playerCtrl = transform.root.GetComponent <CletusController>(); }