public override void OnOverlap(PlayerMovement pm) { HealthSystem health = pm.GetComponent <HealthSystem>(); if (health) { health.TakeDamage(damageAmount); } Vector3 vToPlayer = (pm.transform.position - this.transform.position).normalized; pm.LaunchPlayer(vToPlayer * 20); }
public void PlayerHit(PlayerMovement pm) { pm.LaunchPlayer(new Vector3(0, 30, 0)); }
public override void OnOverlap(PlayerMovement pm) { pm.LaunchPlayer(new Vector3(0, 30, 0)); }