gd: broken weapon throw

This commit is contained in:
2025-06-06 23:21:56 +02:00
parent 579b523a37
commit c2a8b939e8
5 changed files with 72 additions and 16 deletions

View File

@ -119,7 +119,7 @@ public partial class PlayerController : CharacterBody3D
MoveSystem.Init(moveSystemParams);
StairsSystem.Init(stairsBelowRayCast3D, stairsAheadRayCast3D, cameraSmooth);
DashSystem.Init(HeadSystem, camera, TweenQueueSystem);
WeaponSystem.Init(HeadSystem, camera, TweenQueueSystem);
WeaponSystem.Init(HeadSystem, camera);
// RPG Stuff
HealthSystem.HealthSystemInitParams healthSystemParams = new HealthSystem.HealthSystemInitParams()
@ -154,7 +154,9 @@ public partial class PlayerController : CharacterBody3D
{
var (hasHit, location, collisionPoint, collisionNormal) = DashSystem.DashComputation;
var (endWithMantle, dashLocation, mantleLocation) = DashSystem.DashResolve;
var weaponThrowVector = dashLocation - Position;
WeaponSystem.ThrowWeapon(Position, dashLocation, hasHit, collisionPoint, collisionNormal);
DashSystem.CancelDash();
// RemoveChild(WeaponSystem);
}
public void OnInputMove(Vector3 value)
@ -194,6 +196,8 @@ public partial class PlayerController : CharacterBody3D
public void OnDashEnded()
{
_playerState.SendEvent("dash_ended");
// AddChild(WeaponSystem);
WeaponSystem.ResetWeapon();
}
public void OnInputJumpPressed()