33 lines
536 B
C#
33 lines
536 B
C#
using Godot;
|
|
using System;
|
|
|
|
public partial class OrbAttack : Projectile
|
|
{
|
|
[Export]
|
|
private Sprite3D _sprite;
|
|
|
|
public override void _PhysicsProcess(double delta)
|
|
{
|
|
var pathFollow = GetNode<PathFollow3D>("PathFollow3D");
|
|
if (pathFollow.ProgressRatio <= 0.98f)
|
|
{
|
|
pathFollow.Progress += Speed * (float)delta;
|
|
}
|
|
else
|
|
{
|
|
ExplodeAttack();
|
|
}
|
|
}
|
|
|
|
public override void _Process(double delta)
|
|
{
|
|
if (!IsQueuedForDeletion())
|
|
_sprite.RotateY(25);
|
|
}
|
|
|
|
private void ExplodeAttack()
|
|
{
|
|
|
|
}
|
|
}
|