mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-07 22:35:55 +00:00
Fix shader materials on forcefields
This commit is contained in:
parent
968dec6293
commit
dc70bd8122
8 changed files with 201 additions and 25 deletions
|
|
@ -6,18 +6,19 @@ using System.Threading.Tasks;
|
|||
public partial class ForceField : Door
|
||||
{
|
||||
[Export]
|
||||
public Shader TurnOffShader { get; private set; }
|
||||
public Material TurnOffMaterial { get; private set; }
|
||||
|
||||
[Export]
|
||||
public Shader ActiveShader { get; private set; }
|
||||
|
||||
public Material ActiveMaterial { get; private set; }
|
||||
|
||||
// Disable
|
||||
public override void Open()
|
||||
{
|
||||
base.Open();
|
||||
if (TurnOffShader is null) return;
|
||||
if (TurnOffMaterial is null) return;
|
||||
|
||||
((ShaderMaterial)_animatedSprite.Material).Shader = TurnOffShader;
|
||||
_animatedSprite.Material = TurnOffMaterial;
|
||||
//((ShaderMaterial)_animatedSprite.Material).Shader = TurnOffShader;
|
||||
|
||||
_ = AnimateShutdownAsync();
|
||||
}
|
||||
|
|
@ -36,8 +37,9 @@ public partial class ForceField : Door
|
|||
{
|
||||
base.Close();
|
||||
|
||||
if (ActiveShader is null) return;
|
||||
((ShaderMaterial)_animatedSprite.Material).Shader = ActiveShader;
|
||||
if (ActiveMaterial is null) return;
|
||||
_animatedSprite.Material = ActiveMaterial;
|
||||
//((ShaderMaterial)_animatedSprite.Material).Shader = ActiveShader;
|
||||
}
|
||||
|
||||
private void SetShaderTeleportProgress(float value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue