working some more on enemy movement, they stilldon't always want to move to the sides when they reach the front so still some more work to do. also updated the aiming a bit to clamp the arc for firing and drawing, rewrote the draw arc function
This commit is contained in:
+3
-2
@@ -19,8 +19,7 @@ public partial class Commander : Sprite2D
|
||||
{
|
||||
if (_attack.Position.Y > GetViewportRect().Size.Y + 50)
|
||||
{
|
||||
_attack.QueueFree();
|
||||
_attack = null;
|
||||
UnloadAttack();
|
||||
if (_actions <= 0)
|
||||
{
|
||||
EmitSignal(SignalName.ActionsUp);
|
||||
@@ -32,6 +31,7 @@ public partial class Commander : Sprite2D
|
||||
public void AttackEnteredBucket()
|
||||
{
|
||||
_actions += (_actions + 1) > _actionsMax ? 0 : 1;
|
||||
UnloadAttack();
|
||||
}
|
||||
|
||||
public void LoadAttack(Vector2 OFFSET)
|
||||
@@ -65,5 +65,6 @@ public partial class Commander : Sprite2D
|
||||
public void UnloadAttack()
|
||||
{
|
||||
_attack.QueueFree();
|
||||
_attack = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user