protected override void OnHitKnockBack(HitController target) { base.OnHitKnockBack (target); if (player.facingRight ()) { target.Launch (new Vector2 (3, 2), baseKnockback + knockbackGrowth * targetPercentage); } else { target.Launch (new Vector2 (-3, 2), baseKnockback + knockbackGrowth * targetPercentage); } }
protected override void OnHitKnockBack(HitController target) { base.OnHitKnockBack (target); Vector2 launchDirection = target.transform.position - player.getTransform ().position; if (launchDirection.x >= 0) { target.Launch (new Vector2 (1, 3), baseKnockback + knockbackGrowth * targetPercentage); } else { target.Launch (new Vector2 (-1, 3), baseKnockback + knockbackGrowth * targetPercentage); } }
protected override void OnHitKnockBack(HitController target) { base.OnHitKnockBack(target); if (player.facingRight()) { target.Launch(new Vector2(-2, 1), baseKnockback + knockbackGrowth * targetPercentage); } else { target.Launch(new Vector2(2, 1), baseKnockback + knockbackGrowth * targetPercentage); } }
protected override void OnHitKnockBack(HitController target) { base.OnHitKnockBack(target); Vector2 launchDirection = target.transform.position - player.getTransform().position; if (launchDirection.x >= 0) { target.Launch(new Vector2(1, 3), baseKnockback + knockbackGrowth * targetPercentage); } else { target.Launch(new Vector2(-1, 3), baseKnockback + knockbackGrowth * targetPercentage); } }
protected override void OnHitKnockBack(HitController target) { base.OnHitKnockBack (target); Vector2 launchDirection = target.transform.position - player.getTransform ().position; if (Vector2.Angle(Vector2.up, launchDirection) >= 45) { if (launchDirection.x >= 0) launchDirection = new Vector2 (1, 1); else launchDirection = new Vector2 (-1, 1); } target.Launch (launchDirection, baseKnockback + knockbackGrowth * targetPercentage); }