First builds and stuff done yipewaho
This commit is contained in:
@@ -3,9 +3,12 @@ using System;
|
||||
|
||||
public partial class EnemyMovement : Node
|
||||
{
|
||||
[Export] private Enemy _enemy;
|
||||
[Export] private PathFollow2D _pathFollow2D;
|
||||
[Export] private float _speed;
|
||||
|
||||
private float _finalSpeed => _speed + 0.15f * (float)Math.Log(GameController.Instance.Wave + 1);
|
||||
|
||||
private double _time = 0;
|
||||
|
||||
public override void _EnterTree()
|
||||
@@ -15,6 +18,11 @@ public partial class EnemyMovement : Node
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
_pathFollow2D.ProgressRatio += (float)delta * (_speed / 1000f);
|
||||
_pathFollow2D.ProgressRatio += (float)delta * (_finalSpeed / 1000f);
|
||||
|
||||
if (_pathFollow2D.ProgressRatio >= 1.0)
|
||||
{
|
||||
_enemy.Despawn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user