mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-13 04:45:54 +00:00
Interactable interface
This commit is contained in:
parent
49e58ff735
commit
54d9824581
27 changed files with 102 additions and 61 deletions
|
|
@ -17,7 +17,7 @@ public partial class ActorSpawner : Node2D, IActivable
|
|||
SpawnedActor = this.CreateSibling<Actor>(ActorPrefab);
|
||||
}
|
||||
|
||||
public void Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
public bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
if (!WaitForActorDeath)
|
||||
{
|
||||
|
|
@ -27,5 +27,7 @@ public partial class ActorSpawner : Node2D, IActivable
|
|||
{
|
||||
Spawn();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ public partial class Boss : Enemy, IActivable
|
|||
_currentHealth -= amount;
|
||||
}
|
||||
|
||||
public void Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
public bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
_started = true;
|
||||
if (_bossHud is not null)
|
||||
|
|
@ -149,6 +149,8 @@ public partial class Boss : Enemy, IActivable
|
|||
}
|
||||
_gameManager.CameraTargetObject(_cameraMarker);
|
||||
StartPhase(CurrentPhase);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private async Task Switchphase(BossPhase phase)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue