private void ChangeTargetHudResource(float aResourcePercentage, string aResourceText) { myTargetHUD.SetResourceBarFillAmount(aResourcePercentage); myTargetHUD.SetResourceText(aResourceText); if (myTarget.GetComponent <Resource>() != null) { myTargetHUD.SetResourceBarColor(myTarget.GetComponent <Resource>().myResourceColor); } }
private void ChangeMyHudResource(float aResourcePercentage, string aResourceText) { if (!hasAuthority) { return; } myCharacterHUD.SetResourceBarFillAmount(aResourcePercentage); myCharacterHUD.SetResourceText(aResourceText); myCharacterHUD.SetResourceBarColor(myResource.myResourceColor); }