mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Bugfixes
This commit is contained in:
parent
d141bffde6
commit
d927886380
6 changed files with 29 additions and 6 deletions
|
|
@ -14,7 +14,7 @@ public partial class Boss : Enemy, IActivable, IScriptHost
|
|||
//[Export] private Array<BossPhase> Phases;
|
||||
[Export] public BossScript BossScript { get; private set; }
|
||||
//[Export] private PackedScene BossHudPrefab;
|
||||
[Export] public Vector2 BossPhaseAnimationStartingPosition = new Vector2(180, 10);
|
||||
[Export] public Vector2 BossPhaseAnimationStartingPosition = new(180, 10);
|
||||
|
||||
private int currentPhaseIndex = 0;
|
||||
|
||||
|
|
@ -108,6 +108,12 @@ public partial class Boss : Enemy, IActivable, IScriptHost
|
|||
}
|
||||
}
|
||||
|
||||
protected override void ActivateDefeatScript()
|
||||
{
|
||||
GameManager.Instance.ClearBullets();
|
||||
base.ActivateDefeatScript();
|
||||
}
|
||||
|
||||
protected override void Explode()
|
||||
{
|
||||
if (_bossHud is not null)
|
||||
|
|
@ -122,6 +128,7 @@ public partial class Boss : Enemy, IActivable, IScriptHost
|
|||
|
||||
private void StartPhase(BossPhase phase)
|
||||
{
|
||||
GameManager.Instance.ClearBullets();
|
||||
if (phase.PlayAnimation)
|
||||
{
|
||||
_waiting = true;
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ public partial class Enemy : CharacterBody2D
|
|||
}
|
||||
}
|
||||
|
||||
protected void ActivateDefeatScript()
|
||||
protected virtual void ActivateDefeatScript()
|
||||
{
|
||||
if (DefeatScript is not IActivable target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,21 @@ public partial class OptionsMenu : MenuBase
|
|||
VSyncToggle.Toggled += VSyncToggleOnToggled;
|
||||
|
||||
FullScreenToggle.SetPressed(DisplayServer.WindowGetMode() is DisplayServer.WindowMode.Fullscreen);
|
||||
|
||||
FullScreenToggle.Toggled += FullScreenToggleOnToggled;
|
||||
}
|
||||
|
||||
private void FullScreenToggleOnToggled(bool toggledon)
|
||||
{
|
||||
switch (toggledon)
|
||||
{
|
||||
case true:
|
||||
DisplayServer.WindowSetMode(DisplayServer.WindowMode.Fullscreen);
|
||||
break;
|
||||
case false:
|
||||
DisplayServer.WindowSetMode(DisplayServer.WindowMode.Windowed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void VSyncToggleOnToggled(bool toggledOn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue