void Awake() { // Set up the references. timer = waitTime; player = GameObject.FindGameObjectWithTag("Player").transform; playerHealth = player.GetComponent <PlayerStats> (); enemyHealth = GetComponent <BlobHealth> (); }
// Start is called before the first frame update void Start() { animator = GetComponentInChildren <Animator>(); playerHealth = GameObject.FindObjectOfType <PlayerHealth>(); blobHealth = GetComponent <BlobHealth>(); projectilesParent = GameObject.Find("ProjectilesParent"); attackLock = false; }