Preview:
public class PlayerController : MonoBehaviourPunCallbacks, IDamageable
{    
  [Header("Health")] 
  [SerializeField] private Image bloodSplatter;
  [SerializeField] private Sprite OutOfBounds;
  public Transform hitmarkerCanvas;
  [SerializeField] private GameObject hitmarkerItemPrefab;
  private float maxHealth = 100f;
  private float currentHealth = 100f;
  
  public void TakeDamage(float damage, Player killer, Sprite weaponIcon, bool isHeadshot)
  {
    HitmarkerItem item = Instantiate(hitmarkerItemPrefab, hitmarkerCanvas).GetComponent<HitmarkerItem>();
    item.Initialize(isHeadshot);
  }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter