Fix capricorn projectile bug

This commit is contained in:
2023-09-08 12:46:23 -07:00
parent 9256c0a09e
commit f7008b40ff
21 changed files with 161 additions and 279 deletions

View File

@@ -88,6 +88,11 @@ public partial class Character : CharacterBody3D
projectile.Position = Position;
GetParent().AddChild(projectile);
var projectiles = projectile.GetChildren().OfType<Projectile>();
foreach (var proj in projectiles)
{
if (proj.HasRotation)
proj.Rotation = GetNode<Node3D>("Pivot").Rotation;
}
CanShoot = false;
await ToSignal(GetTree().CreateTimer(projectiles.First().Cooldown), "timeout");
CanShoot = true;