public void Start() { block = GameObject.Find("Block"); durability = block.GetComponent <DurabilityManager>(); healthBar = transform.FindChild("HealthBar").gameObject; currentHealthImage = healthBar.transform.FindChild("CurrentHealth").GetComponent <Image>(); healthText = healthBar.transform.FindChild("Text").GetComponent <Text>(); }
// Start is called before the first frame update private void Start() { DM = GetComponentInParent <DurabilityManager>(); }