goodbye collisions

This commit is contained in:
2023-09-07 20:03:22 -07:00
parent 4b840bbe7f
commit 833ad3209e
37 changed files with 410 additions and 299 deletions

View File

@@ -1,4 +1,5 @@
using Godot;
using System.Linq;
public partial class CapricornControls : Character
{
@@ -84,10 +85,10 @@ public partial class CapricornControls : Character
{
IsShooting = true;
CanShoot = false;
var projectile = projectileScene.Instantiate<Projectile>();
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
projectile.Position = Position + new Vector3(0f, 1f, 0f);
projectile.ParentCharacter = this;
var projectile = projectileScene.Instantiate<Node3D>();
var projectileCooldown = projectile.GetChildren().OfType<Projectile>().First();
await ToSignal(GetTree().CreateTimer(projectileCooldown.Cooldown), "timeout");
projectile.Position = Position;
GetParent().AddChild(projectile);
CanShoot = true;
IsShooting = false;