/*para garantir o sincronismo!!! */ public void SetLifeBarUi(){ if(! uiManagement) uiManagement = FindObjectOfType<UiManagement>(); uiManagement.SetPlayerlifeBarUI(); uiManagement.UpdatePlayerlifeBarUI(); }
public void setUiManagementReference(){ try{ uiManagement = FindObjectOfType<UiManagement>(); uiManagement.SetPlayerlifeBarUI(); uiManagement.UpdatePlayerlifeBarUI(); uiManagement.UpdateWeaponIcon(); }catch(System.Exception e){ Debug.LogWarning(e); } }