looping music , transition speed up, enemy spped up
This commit is contained in:
@@ -9,23 +9,23 @@ public partial class Level : Node3D
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
_enemies = GetNode("Enemies").GetChildren().OfType<BasicEnemy>().ToList();
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
_enemies = GetNode("Enemies").GetChildren().OfType<BasicEnemy>().ToList();
|
||||
}
|
||||
|
||||
public void OnEnemyDefeated(BasicEnemy enemy)
|
||||
{
|
||||
if (_enemies.Contains(enemy))
|
||||
{
|
||||
GD.Print("On enemy defeated " + enemy.Name);
|
||||
_enemies.Remove(enemy);
|
||||
if (!_enemies.Any())
|
||||
_gameManager.OnAllEnemiesDefeated();
|
||||
}
|
||||
if (_enemies.Contains(enemy))
|
||||
{
|
||||
GD.Print("On enemy defeated " + enemy.Name);
|
||||
_enemies.Remove(enemy);
|
||||
if (!_enemies.Any())
|
||||
_gameManager.OnAllEnemiesDefeated();
|
||||
}
|
||||
}
|
||||
|
||||
public void GameEnding()
|
||||
{
|
||||
QueueFree();
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@ public partial class OrbAttack : Projectile
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
var pathFollow = GetNode<PathFollow3D>("PathFollow3D");
|
||||
if (pathFollow.ProgressRatio <= 0.98f)
|
||||
{
|
||||
pathFollow.Progress += Speed * (float)delta;
|
||||
}
|
||||
else
|
||||
{
|
||||
ExplodeAttack();
|
||||
}
|
||||
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);
|
||||
if (!IsQueuedForDeletion())
|
||||
_sprite.RotateY(25);
|
||||
}
|
||||
|
||||
private void ExplodeAttack()
|
||||
|
||||
Reference in New Issue
Block a user