goodbye collisions
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user