mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 05:15:55 +00:00
Added shrouds to rooms
This commit is contained in:
parent
07d49a0b23
commit
f460103239
12 changed files with 104 additions and 32 deletions
|
|
@ -7,6 +7,9 @@ public partial class BlackCover : Sprite2D, IActivable
|
|||
{
|
||||
[Export]
|
||||
public bool StartActive { get; private set; } = true;
|
||||
|
||||
[Signal]
|
||||
public delegate void DisabledEventHandler();
|
||||
|
||||
private bool _activated;
|
||||
|
||||
|
|
@ -47,7 +50,18 @@ public partial class BlackCover : Sprite2D, IActivable
|
|||
}
|
||||
else
|
||||
{
|
||||
EmitSignalDisabled();
|
||||
this.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAreaEntered(Area2D area)
|
||||
{
|
||||
if (area is not InteractionController interactionController)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_activated = false;
|
||||
UpdateSprite();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue