void Awake() { // Setting up references...? transform.position = new Vector3(0, -16, 0); //puts character in starting position player = GameObject.FindGameObjectWithTag("Player"); slidersScript = player.GetComponent <PlayerSliders> (); scoreScript = GameObject.Find("HighScoresObj").GetComponent <HighScores>(); extAudio = GameObject.Find("ExternalAudioObj").GetComponent <ExternalAudio>(); //groundCheck = transform.Find ("groundCheck"); source = GetComponent <AudioSource>(); //reference to WalkinDude's audioSource component //guiDeathBoxVariables guiBoxWidth = 300; guiBoxHeight = 50; guiBoxX = (Screen.width / 2) - (guiBoxWidth / 2); guiBoxY = (Screen.height / 2) - (guiBoxHeight / 2); guiButtonWidth = 40; guiButtonHeight = 20; guiButtonX = (Screen.width / 2) - (guiButtonWidth / 2); guiButtonY = guiBoxY + guiBoxHeight - guiButtonHeight; //set variables to starting moveSpeed = moveSpeedNormal; //jumpForce = jumpForceNormal; canSpeed = canSpeedNormal; //update can UI text, starts at 0 UpdateSnakeCount(); }
// Use this for initialization void Awake() { camera = GameObject.FindGameObjectWithTag("MainCamera"); //ref to camera extAudio = camera.GetComponent <ExternalAudio>(); //ref to camera's ExternalAudio Script player = GameObject.FindGameObjectWithTag("Player"); playerCtrl = player.GetComponent <WalkinDudeController>(); playerDead = playerCtrl.isDead; groundCheck = transform.Find("groundCheck"); }
void Awake() { camera = GameObject.FindGameObjectWithTag("MainCamera"); //ref to camera extAudio = camera.GetComponent <ExternalAudio>(); //ref to camera's ExternalAudio Script }
// Use this for initialization void Awake() { camera = GameObject.FindGameObjectWithTag("MainCamera"); extAudio = camera.GetComponent <ExternalAudio>(); }
void Awake() { camera = GameObject.FindGameObjectWithTag("MainCamera"); //ref to camera extAudio = camera.GetComponent <ExternalAudio>(); //ref to camera's ExternalAudio Script playerCtrl = transform.root.GetComponent <CletusController>(); }