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