// Start is called before the first frame update // Update is called once per frame void Start() { hearts_UI = GameObject.Find("UI_heart").gameObject.GetComponent <UI_hearts>(); s_m = GameObject.Find("SoundsManager").GetComponent <Sounds_manager>(); attack_system = GetComponent <Attack_system>(); if (gameObject.tag == "Player") { hearts_UI.Change_hearts(health); } }