Stash work on refactor of trajecotry

This commit is contained in:
Michal Pikulski
2025-12-04 16:23:53 +01:00
parent 6d4080438d
commit e90f839fc1
7 changed files with 644 additions and 65 deletions

View File

@@ -112,11 +112,6 @@ namespace Minigames.FortFight.Core
#region Override Methods
protected override float GetProjectileMass()
{
return _currentAmmo?.GetMass() ?? base.GetProjectileMass();
}
protected override void StartDrag(Vector2 worldPosition)
{
// Check ammo before starting drag
@@ -129,29 +124,6 @@ namespace Minigames.FortFight.Core
base.StartDrag(worldPosition);
}
#endregion
#region Abstract Method Implementations
protected override void ShowPreview()
{
trajectoryPreview?.Show();
}
protected override void HidePreview()
{
trajectoryPreview?.Hide();
}
protected override void UpdateVisuals(Vector2 currentPosition, Vector2 direction,
float force, float dragDistance, float mass)
{
if (trajectoryPreview != null)
{
trajectoryPreview.UpdateTrajectory(launchAnchor.position, direction, force, mass);
}
}
protected override void PerformLaunch(Vector2 direction, float force)
{
LaunchProjectile(direction, force);