all that we can do with this emotion
This commit is contained in:
32
Levels/Scripts/OrbAttack.cs
Normal file
32
Levels/Scripts/OrbAttack.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user