mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 14:35:55 +00:00
Capacitors and parallax
This commit is contained in:
parent
c5ed30f458
commit
3670da9719
29 changed files with 705 additions and 57 deletions
|
|
@ -31,19 +31,26 @@ public partial class Door : Activable
|
|||
{
|
||||
_animatedSprite.Play("Opening");
|
||||
State = DoorState.Open;
|
||||
_collisionShape.Disabled = true;
|
||||
_solidShape.Disabled = true;
|
||||
CallDeferred(MethodName.DeferredDisableCollision, true);
|
||||
//_collisionShape.Disabled = true;
|
||||
//_solidShape.Disabled = true;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
_animatedSprite.Play("Closing");
|
||||
State = DoorState.Closed;
|
||||
_collisionShape.Disabled = false;
|
||||
_solidShape.Disabled = false;
|
||||
|
||||
CallDeferred(MethodName.DeferredDisableCollision, false);
|
||||
//_collisionShape.Disabled = false;
|
||||
//_solidShape.Disabled = false;
|
||||
}
|
||||
|
||||
private void DeferredDisableCollision(bool state)
|
||||
{
|
||||
_collisionShape.Disabled = state;
|
||||
_solidShape.Disabled = state;
|
||||
}
|
||||
|
||||
public override void Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
switch (activationType)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue