IEnumerator <WaitForSeconds> Respawn() { yield return(new WaitForSeconds(1.5f)); robot.HideCorpse(); OnActivateFactory?.Invoke(this); yield return(new WaitForSeconds(0.5f)); var anim = GetComponent <Animator>(); anim.SetTrigger("Spawn"); yield return(new WaitForSeconds(.6f)); robot.Respawn(Tile); yield return(new WaitForSeconds(0.3f)); OnSpawnRobot?.Invoke(robot); }