protected virtual void Start() { SetMaxHealthFromHealthLevel(); currentHealth = maxHealth; animatorHandler = GetComponentInChildren <AnimatorHandler>(); weaponSlotManager = GetComponentInChildren <WeaponSlotManager>(); }
private void OnTriggerEnter(Collider other) { PlayerStats playerStats = other.GetComponent <PlayerStats>(); if (playerStats != null) { WeaponSlotManager weaponSlotManager = other.GetComponentInChildren <WeaponSlotManager>(); weaponSlotManager.CloseDamageCollider(); playerStats.TakeDamage(damage, 0); } }