mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-07 23:15:55 +00:00
Bullet freeze
This commit is contained in:
parent
57ff504628
commit
34a07342ac
31 changed files with 255 additions and 8 deletions
|
|
@ -30,6 +30,8 @@ public partial class Bullet : Area2D
|
|||
|
||||
public bool IsGrazed { get; set; } = false;
|
||||
|
||||
public bool IsFrozen { get; private set; } = false;
|
||||
|
||||
[Signal] public delegate void OnDestroyEventHandler();
|
||||
|
||||
private AudioStreamPlayer2D _grazeSound;
|
||||
|
|
@ -182,8 +184,7 @@ public partial class Bullet : Area2D
|
|||
{
|
||||
ApplyTimeModifiers(delta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (BulletInfo.Controllabe)
|
||||
{
|
||||
ControlBullet(delta);
|
||||
|
|
@ -273,6 +274,13 @@ public partial class Bullet : Area2D
|
|||
EmitSignal(SignalName.OnDestroy);
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
public void Freeze()
|
||||
{
|
||||
IsFrozen = true;
|
||||
EmitSignal(SignalName.OnDestroy);
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
public enum BulletOwner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue