private void SetTargetHUD()
    {
        myTargetHUD.Show();
        myTarget.GetComponent <Health>().EventOnHealthChange += ChangeTargetHudHealth;
        ChangeTargetHudHealth(myTarget.GetComponent <Health>().GetHealthPercentage(),
                              myTarget.GetComponent <Health>().myCurrentHealth.ToString() + "/" + myTarget.GetComponent <Health>().MaxHealth,
                              myTarget.GetComponent <Health>().GetTotalShieldValue());

        if (myTarget.GetComponent <Resource>() != null)
        {
            myTarget.GetComponent <Resource>().EventOnResourceChange += ChangeTargetHudResource;
            ChangeTargetHudResource(myTarget.GetComponent <Resource>().GetResourcePercentage(),
                                    myTarget.GetComponent <Resource>().myCurrentResource.ToString() + "/" + myTarget.GetComponent <Resource>().MaxResource);
            myTargetHUD.SetResourceBarColor(myTarget.GetComponent <Resource>().myResourceColor);
        }
        else
        {
            ChangeTargetHudResource(0.0f, "0/0");
        }


        if (myTarget.tag == "Enemy")
        {
            myTargetHUD.SetName(myTarget.name);
            myTargetHUD.SetNameColor(Color.red);
        }
        else if (myTarget.tag == "Player")
        {
            if (myTarget.GetComponent <PlayerCharacter>() != null)
            {
                myTargetHUD.SetName(myTarget.GetComponent <PlayerCharacter>().Name);
            }
            myTargetHUD.SetNameColor(new Color(120f / 255f, 1.0f, 0.0f));
        }
    }
    private void ChangeMyHudResource(float aResourcePercentage, string aResourceText)
    {
        if (!hasAuthority)
        {
            return;
        }

        myCharacterHUD.SetResourceBarFillAmount(aResourcePercentage);
        myCharacterHUD.SetResourceText(aResourceText);
        myCharacterHUD.SetResourceBarColor(myResource.myResourceColor);
    }