private IEnumerator _hurt(int dmg)
{
print($"{gameObject.name} hurt for {dmg}");
health -= dmg;
if (health <= 0)
{
GameRound.Instance.EndGame(gameObject.name);
}
JSONObject jSonObject = HurtMsgFormat.Copy();
jSonObject["playerName"].str = gameObject.name;
jSonObject["health"].n = health;
jSonObject["dmg"].n = dmg;
_eventManager.InvokeEvent("playerHurt", jSonObject);
yield return(null);
}