void Awake() { // Setting up references. playerControl = GetComponent <PlayerControl>(); healthBar = GameObject.Find("HealthBar").GetComponent <SpriteRenderer>(); score = GameObject.Find("Score").GetComponent <Score>(); deltaDNA = GameObject.Find("DeltaDNA").GetComponent <DeltaStartScript>(); anim = GetComponent <Animator>(); //laybombs = GameObject.Find("hero").GetComponent<LayBombs>(); // Getting the intial scale of the healthbar (whilst the player has full health). healthScale = healthBar.transform.localScale; }
void Awake() { // Setting up the reference. playerControl = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); deltaDNA = GameObject.Find("DeltaDNA").GetComponent <DeltaStartScript>(); }