public void SetDamage(float damage) { if (invincible) { return; } controller.TakeDamage(damage); StartCoroutine(StunnedState()); }
public void SetDamage(Vector3 contactPoint, float damage) { if (invincible) { return; } controller.TakeDamage(damage); if (transform.position.x < contactPoint.x) { UpdateFacingDirection(true); } else { UpdateFacingDirection(false); } if (gameObject.activeSelf) { StartCoroutine(StunnedState()); } }