CUTTTTTAAAAA
This commit is contained in:
@@ -4,9 +4,23 @@ public partial class CutterShot : Projectile
|
||||
{
|
||||
[Export]
|
||||
private PathFollow3D _pathFollow;
|
||||
[Export]
|
||||
private Sprite3D _sprite;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_pathFollow = GetNode<PathFollow3D>("Path3D/PathFollow3D");
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
_pathFollow.Progress += Speed * (float)delta;
|
||||
_pathFollow.Progress += 10f * (float)delta;
|
||||
if (Mathf.IsEqualApprox(_pathFollow.ProgressRatio, 1.0f))
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
_sprite.RotateY(25);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public partial class Player1 : Character
|
||||
private async void Fire()
|
||||
{
|
||||
var projectile = _fireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, -1f);
|
||||
projectile.Position = Position;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
|
||||
@@ -76,7 +76,7 @@ public partial class Player1 : Character
|
||||
private async void AltFire()
|
||||
{
|
||||
var projectile = _altFireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, -1f);
|
||||
projectile.Position = Position;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
|
||||
|
||||
@@ -6,7 +6,7 @@ public partial class Projectile : Node3D
|
||||
public double Cooldown { get; protected set; }
|
||||
|
||||
[Export]
|
||||
private float _projectileSpeed = 100f;
|
||||
private float _projectileSpeed = 1f;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user