Falling rose petal effect

This commit is contained in:
2023-09-13 19:39:10 -07:00
parent 6138957524
commit ce7576731c
16 changed files with 229 additions and 49 deletions

View File

@@ -20,7 +20,7 @@ public partial class CapricornControls : Character
MoveAndSlide();
}
public override void _UnhandledInput(InputEvent @event)
public override void _Input(InputEvent @event)
{
if (Input.IsActionJustPressed("exit"))
GetTree().Quit();
@@ -86,8 +86,8 @@ public partial class CapricornControls : Character
{
IsShooting = true;
CanShoot = false;
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
var projectile = _fireProjectile.Instantiate<Node3D>();
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
projectile.Position = Position;
if (GetParent() != null)
GetParent().AddChild(projectile);
@@ -99,8 +99,8 @@ public partial class CapricornControls : Character
{
IsShooting = true;
CanShoot = false;
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
var projectile = _altFireProjectile.Instantiate<Node3D>();
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
projectile.Position = Position;
if (GetParent() != null)
GetParent().AddChild(projectile);