public override void OnHitConnected(Robot enemy) { float damage = 10; float speed = 50; float direction = owner.IsFacingLeft() ? -1 : 1; Vector2 pushVelocity = new Vector2(direction * speed, 0); enemy.HeavyHitStun(damage, pushVelocity, 0.2f); collider.enabled = false; }
public override void OnHitConnected(Robot enemy) { float damage = 10; float speed = 80; float duration = 0.1f; float facing = owner.IsFacingLeft() ? -1 : 1; Vector2 direction = new Vector2(facing, 3); direction.Normalize(); Vector2 pushVelocity = direction * speed; enemy.HeavyHitStun(damage, pushVelocity, duration); collider.enabled = false; }